
打开IDEA的setting窗口,选择Plugins,打开Browse repositories

image.png
搜索选择安装之后重启Idea就好了。

image.png

新建一个Test类
public class Test { public static void main(String[] args) { int a = 1; int b = 2; a++; b--; int c = a + b; System.out.println(c); } }
12345678910111213 | public class Test { public static void main(String[] args) { int a = 1; int b = 2; a++; b--; int c = a + b; System.out.println(c); }} |
|---|
编译好后,点击show bytecode,可以看到完整的字节码信息

当然,也可以点击 Show ByteCode with Jclasslib,这时可以看到该类的基本信息、常量池、接口、属性、函数等信息。

另外,如果想了解某个具体字节码指令的含义,可以点击它,就会跳转到 java虚拟机规范对应的章节。
假设咱们想看iconst_1,点击它


更细节的功能,大家自行挖掘吧
安装方式如上

image.png

image.png
在弹出窗口选择要打开的文件

不积跬步,无以至千里