[Tex/LaTex] How to highlight Java bytecode

highlightingjavaminted

I usually use minted to display highlighted source code. But it seems as if minted would not support Java bytecode (see list of supported languages).

How can I insert highlighted java bytecode?

(Is there perhaps another "language" that has a similar instruction set? Does listings have an option for bytecode? Has somebody manually created a highlighting file for minted/listings?)

Best Answer

Since, AFAICS, no one has done this already, you need to write a JVM lexer for Pygments. That involves some not quite trivial Python programming: see the official instructions for several approaches to constructing a lexer, but you will likely find that the RegexLexer suffices for your needs.

Related Question