Possible Duplicate:
Is there a java classfile / bytecode editor to edit instructions?
Java source code is compiled into bytecode, which is actually in the class file. Is it possible to view bytecode of a compiled class?
If it is possible, can it be edited?
Is there an eclipse plugin for that available?
A Java class file is a file (with the . class filename extension) containing Java bytecode that can be executed on the Java Virtual Machine (JVM).
class file is the byte-code. It is the result of compiling java source code (text) into the intermediate format, byte-code. The byte-code is then interpreted by the JVM and compiled into a language understandable by your CPU.
Bytecode is an important machine-level language that is executed on the JVM – Java Virtual Machine. Anytime you load a class, it receives a bytecode stream for each method of the class. Whenever you call this method in program execution, the bytecode of this method is called. Javac does both programs.
Yes. You can use the javap
command that's included with the JDK to see the byte code of a class. For example:
javap -c com.mypackage.MyClass
There are several libraries and tools that help you to work with Java bytecode, for example ASM and Jasmin.
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