Is it possible to see JVM code codes from a class file?

This is actually not decompilation, I do not want to see the source, instead I want to see JVM instructions such as invoke some/package/method()V

Is there a tool for this purpose?

+5
source share
3 answers

I am using the Eclipse + Bytecode Outline plugin for Eclipse http://andrei.gmxhome.de/bytecode/index.html . Here is the bytecode

  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 ... 
+2
source

Try the following: http://set.ee/jbe/

This tool allows you to see operation codes, attributes and edit them. This is really useful, but does not work with Java 8 lambdas.

+2
source

suppose you have a class file MyClass.class

you can easily see which JVM instructions make up your class file using the program sent by jdk itself in the same bin directory where java and javac exist.

  javap -c MyClass.class 

The above team will provide you with what you are looking for.

+2
source

Source: https://habr.com/ru/post/1200908/


All Articles