This is actually not about decompiling, I don't want to see the source, instead I want to see JVM instructions like invoke some/package/method()V
.
Is there a tool for this purpose?
A Java Virtual Machine instruction consists of an opcode specifying the operation to be performed, followed by zero or more operands embodying values to be operated upon. This chapter gives details about the format of each Java Virtual Machine instruction and the operation it performs.
Open the necessary . class file in the editor in IntelliJ IDEA and then select View | Show Bytecode from the main menu.
The . 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.
suppose you have a class file named MyClass.class
you can easily see what JVM instructions constitute your classfile by using a program shipped by jdk itself,in the same bin directory where java and javac exist.
javap -c MyClass.class
The above command will provide you with what you be be looking for.
I am using Eclipse + Bytecode Outline plugin for Eclipse http://andrei.gmxhome.de/bytecode/index.html. THis is how bytecode looks like
public static main([Ljava/lang/String;)V throws java/io/IOException
L0
LINENUMBER 11 L0
INVOKESTATIC test/Test.x ()V
L1
LINENUMBER 12 L1
RETURN
...
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