使用jad查看Java的字节码指令

来源:互联网 发布:开源大数据调度系统 编辑:程序博客网 时间:2024/04/30 01:46

使用jad工具

下载地址:http://www.varaneckas.com/jad

把jad.exe 放到jre bin目录下.


也可以使用eclip的插件,下载地址:

http://sourceforge.net/projects/jadclipse/

配置jadclipse :

Window>Preferences...>Java>JadClipse>Path to Decompiler,配置Jad的可执行文件路径(设置完整路径,例如:C:\Program File\Jad\jad.exe)
Window>Preferences..>General>Editors>File Associations,确保*.class 文件已经默认为JadClipse的查看器打开。


jad -af -p xxxx.class > xxxx.txt

  -a    - 用JVM字节格式来注解输出

  -af    - 同 -a,但是注解的时候用全名称

  -clear  - 清除所有的前缀

  -b    - 输出多于的括号 (e.g., if(a) { b(); }, default: no)

  -d

  - 指定输出文件的文件目录

  -dead   -试图反编译代码的dead 部分(default: no)

  -disass  - 不用用字节码的方式反编译 (no JAVA source generated)

  -f    - 输出整个的名字,无论是类还是方法

  -ff    -输出类的成员在方法之前 (default: after methods)

  -i    - 输出所有的变量的缺省的最初值

  -l  - 将strings分割成指定数目的块的字符 (default: no)

  -lnc   - 将输出文件用行号来注解 (default: no)

  -nl    - 分割strings用新行字符 newline character (default: no)

  -nodos  -不要去检查class文件是否以dos方式写 (CR before NL, default: check)

  -nocast  - 不要生成辅助文件

  -nocode  -不要生成方法的源代码

  -noconv  - 不要转换java的定义符 (default: do)

  -noctor  - 不允许空的构造器存在

  -noinner  -关掉对内部类的支持 (default: turn on)

  -nolvt  - 忽略局部变量的表信息

  -nonlb   - 不要输出一个新行在打开一个括号之前 (default: do)

  -o    - 无需确认直接覆盖输出 (default: no)

  -p    - 发送反编译代码到标准输出 STDOUT (e.g., for piping)





原创粉丝点击