ilasm / ildasm的Java字节码等效项 [英] Java bytecode equivalents for ilasm / ildasm
问题描述
对于CIL / MSIL,我可以在文本编辑器中编写代码,并使用ilasm / ildasm进行编译/反编译。
For CIL / MSIL, I can write the code in a text editor and compile / decompile with ilasm / ildasm.
我可以使用Reflector查看生成的CIL
I can use Reflector to see the CIL generated by a .NET class.
在Java世界中,javap -c显示了反汇编的字节码。
In the Java world, javap -c shows the disassembled byte code.
如何编译Java字节码? (即,相当于ilasm / ildasm的Java)。
How do I compile Java bytecode? (i.e. the Java equivalent of ilasm / ildasm).
是否有一个支持Java字节码的IDE?
Is there an IDE that supports Java bytecode?
IDE是否支持调试,即单步/断点等?
Does the IDE support debugging i.e. single stepping / breakpoints etc.?
推荐答案
要使用字节码,可以使用ASM或 BCEL
to play with bytecode you can use ASM or BCEL
看看org.apache.bcel.util.BCELifier,它接受一个给定的类并将其转换为BCEL程序(当然是Java)。它将向您展示如何使用BCEL生成某些代码。
Take a look at org.apache.bcel.util.BCELifier, it takes a given class and converts it to a BCEL program (in Java, of course). It will show you how certain code is generated using BCEL.
这篇关于ilasm / ildasm的Java字节码等效项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!