I want a JVM assembler that is straightforward and simple. It should take a text file written in the mnemonic language described in The Java Virtual Machine Specification and produce class files, i.e. bytecode.
To be clear: I don't want a library that can generate class files from invocations of an API.
What are the current statuses of the JVM assemblers? Do they support invokedynamic (not mandatory to me, but an advantage)? On what operative system can I use them? What are their individual pros and cons?
Some time has passed, and now there is an alternative to Jasmin called Krakatau.
From the README.txt
:
The Krakatau assembler is intended as a replacement for Jasmin, and was originally written due to the limitations of Jasmin. It is mostly backwards compatible with Jasmin's syntax, though not necessarily with the extensions introduced in JasminXT. However, Krakatau offers many new features, most importantly the ability to directly specify constant pool references.
At this time, it seems that Krakatau was last updated a month ago, and Jasmin was last updated nine years ago.
Krakatau does support invokedynamic
and utilizes the same instruction names as are used in the JVMS.
Krakatau is implemented in Python. Personally, I like my Java tools to be implemented in Java, but given the nature of this tool (constructing class files from non-Java source) and the lack of competition in this niche, I'll give it a chance.
Jasmin is the de facto standard. Recent versions support invokedynamic. It's written in Java, so it's portable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With