eclipse插件
2016-05-08 15:40
190 查看
Bytecode Visualizer:分析调试 Java 字节码,直接去官网找,然后有个install now按钮拖到eclipse空间就会帮你下载!
下面是用Bytecode Visualizer查看的字节码信息:
源代码是:
下面是用Bytecode Visualizer查看的字节码信息:
/* ******************************************** */ /* Generated by Dr. Garbage Bytecode Visualizer */ /* http://www.drgarbage.com */ /* Version: 4.5.0.201508311741 */ /* Class retrieved from: Filesystem */ /* Retrieved on: 2016-05-08 15:39:48.271 */ /* ******************************************** */ /* class file format version 52.0 (java 1.8) */ package com.xll.test; public class Test { /* Constant Pool */ /* -------+----------------------+------------------------------------------- */ /* index | tag | info */ /* -------+----------------------+------------------------------------------- */ /* 1 | CONSTANT_Class | name_index=2 */ /* 2 | CONSTANT_Utf8 | length=17; bytes="com/xll/test/Test" */ /* 3 | CONSTANT_Class | name_index=4 */ /* 4 | CONSTANT_Utf8 | length=16; bytes="java/lang/Object" */ /* 5 | CONSTANT_Utf8 | length=6; bytes="<init>" */ /* 6 | CONSTANT_Utf8 | length=3; bytes="()V" */ /* 7 | CONSTANT_Utf8 | length=4; bytes="Code" */ /* 8 | CONSTANT_Methodref | class_index=3; name_and_type_index=9 */ /* 9 | CONSTANT_NameAndType | name_index=5; descriptor_index=6 */ /* 10 | CONSTANT_Fieldref | class_index=11; name_and_type_index=13 */ /* 11 | CONSTANT_Class | name_index=12 */ /* 12 | CONSTANT_Utf8 | length=16; bytes="java/lang/System" */ /* 13 | CONSTANT_NameAndType | name_index=14; descriptor_index=15 */ /* 14 | CONSTANT_Utf8 | length=3; bytes="out" */ /* 15 | CONSTANT_Utf8 | length=21; bytes="Ljava/io/PrintStream;" */ /* 16 | CONSTANT_String | string_index=17 */ /* 17 | CONSTANT_Utf8 | length=5; bytes="nihao" */ /* 18 | CONSTANT_Methodref | class_index=19; name_and_type_index=21 */ /* 19 | CONSTANT_Class | name_index=20 */ /* 20 | CONSTANT_Utf8 | length=19; bytes="java/io/PrintStream" */ /* 21 | CONSTANT_NameAndType | name_index=22; descriptor_index=23 */ /* 22 | CONSTANT_Utf8 | length=7; bytes="println" */ /* 23 | CONSTANT_Utf8 | length=21; bytes="(Ljava/lang/String;)V" */ /* 24 | CONSTANT_Utf8 | length=15; bytes="LineNumberTable" */ /* 25 | CONSTANT_Utf8 | length=18; bytes="LocalVariableTable" */ /* 26 | CONSTANT_Utf8 | length=4; bytes="this" */ /* 27 | CONSTANT_Utf8 | length=19; bytes="Lcom/xll/test/Test;" */ /* 28 | CONSTANT_Utf8 | length=4; bytes="main" */ /* 29 | CONSTANT_Utf8 | length=22; bytes="([Ljava/lang/String;)V" */ /* 30 | CONSTANT_Methodref | class_index=1; name_and_type_index=9 */ /* 31 | CONSTANT_Utf8 | length=4; bytes="args" */ /* 32 | CONSTANT_Utf8 | length=19; bytes="[Ljava/lang/String;" */ /* 33 | CONSTANT_Utf8 | length=10; bytes="SourceFile" */ /* 34 | CONSTANT_Utf8 | length=9; bytes="Test.java" */ /* -------+----------------------+------------------------------------------- */ /* compiled from Test.java */ public Test() { /* L4 */ 0 aload_0; /* this */ 1 invokespecial 8; /* java.lang.Object() */ /* L5 */ 4 getstatic 10; /* java.lang.System.out */ 7 ldc 16; /* "nihao" */ 9 invokevirtual 18; /* void println(java.lang.String arg0) */ /* L6 */ 12 return; /* LineNumberTable */ /* ----------+------------- */ /* start_pc | line_number */ /* ----------+------------- */ /* 0 | 4 */ /* 4 | 5 */ /* 12 | 6 */ /* ----------+------------- */ /* LocalVariableTable */ /* -------+----------+--------+------------+------------------ */ /* index | start_pc | length | name_index | descriptor_index */ /* -------+----------+--------+------------+------------------ */ /* 0 | 0 | 13 | 26 | 27 */ /* -------+----------+--------+------------+------------------ */ /* ExceptionTable (empty) */ /* max_stack: 2 max_locals: 1 */ } public static void main(java.lang.String[] args) { /* L9 */ 0 new 1; 3 invokespecial 30; /* com.xll.test.Test() */ /* L10 */ 6 return; /* LineNumberTable */ /* ----------+------------- */ /* start_pc | line_number */ /* ----------+------------- */ /* 0 | 9 */ /* 6 | 10 */ /* ----------+------------- */ /* LocalVariableTable */ /* -------+----------+--------+------------+------------------ */ /* index | start_pc | length | name_index | descriptor_index */ /* -------+----------+--------+------------+------------------ */ /* 0 | 0 | 7 | 31 | 32 */ /* -------+----------+--------+------------+------------------ */ /* ExceptionTable (empty) */ /* max_stack: 1 max_locals: 1 */ } }
源代码是:
package com.xll.test; public class Test { public Test() { System.out.println("nihao"); } public static void main(String[] args) { new Test(); } }
相关文章推荐
- 20145330第十周《Java学习笔记》
- Java热更新
- Spring Data JPA进阶——Specifications和Querydsl
- java Swing布局管理之GridLayout布局
- java从0开始学习第十二课-多线程是如此的简单
- JAVA中的循环
- SpringMVC实战(四)-处理模型数据
- Java学习之多态
- Spring MVC使用POJO以及servlet原生api作为参数
- 线程池(ThreadPoolExecutor JDK1.7)
- java操作Excel表
- Java 缩放图片工具类,创建缩略图、伸缩图片比例
- struts2进行文件的下载
- 20145206《Java程序设计》第10周学习总结
- java IO 四(转换流的使用)
- Java String 学习
- Java编写迷宫小游戏
- java基础第三天_数组
- 20145337 《Java程序设计》第10周学习总结
- 深入理解Java类加载