jadclipse

 

jadclipse插件网站: http://jadclipse.sourceforge.net/

一、下载:
下载插件:
下载jadclipse_3.1.0.jar版本,该版本支持eclipse3.1M6以上
下载jadclipse_3.2.0.jar版本,该版本支持eclipse3.2M3和eclipse3.2M4.
下载jadclipse_3.2.2.jar版本,该版本支持eclipse3.2M5以上。


    二、安装:
    方法1、直接将jadclipse_3.1.0.jar复制到%ECLIPSE_HOME%\plugins目录下。cmd -> %

ECLIPSE_HOME% ->eclipse -clean 
    方法2、使用link方式安装,建立E:\eclipse3.1plugins\jadclipse3.1.0

\eclipse\plugins的目录结构,将jadclipse_3.1.0.jar放到plugins目录下面(注:其中E:

\eclipse3.1plugins为你自己定义的一个专门放置插件的目录)。再在%ECLIPSE_HOME%

\links目录下面建立一个jadclipse3.1.0.link文件(该文件名随便取,保证后缀为。link就

OK)。文件里面内容为:path=E:\\eclipse3.1plugins\\jadclipse3.1.0.启动eclipse,打

开Window->Preferences->Java->JadClipse,如果没有找到JadClipse,检查插件安装的版本

是否与你安装的eclipse版本对应。
我安装的eclipse是:eclipse3.1.2

三、设置参数:
    启动eclipse,打开:Window->Preferences->Java->JadClipse.
1、Path to decompiler,这里设置反编译工具jad的全路径名,比如:%JAVA_HOME%

\bin\jad.exe.
2、Directory for temporary files,这里设置临时文件路径。

    至于Window->Preferences->Java->JadClipse目录下的Debug,Directives,Formatting

,Misc目录中的参数设置,就不罗嗦。

    四、安装完成后,eclipse自动将JadClipse Class File Viewer设置成class文件的缺省

打开方式。如果没有默认,可以在Eclipse的Windows——> Perference——>General-

>Editors->File Associations中修改“*.class”默认关联的编辑器为“JadClipse Class

File Viewer”。设置完成后,双击*.class文件,eclipse将自动反编译。

    注:对于存在源代码的类,它不会强行反编译,也就是说它还是会用eclipse自带的

Class File Viewer查看class文件。

错误 代码
  1. 错误:   
  2.   
  3. /*jadclipse*/Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov (kpdus@yahoo.com).   
  4. Usage:    jad [option(s)]    
  5. Options: -a       - generate JVM instructions as comments (annotate)   
  6.          -af      - output fully qualified names when annotating   
  7.          -b       - generate redundant braces (braces)   
  8.          -clear   - clear all prefixes, including the default ones   
  9.          -d for output files   
  10.          -dead    - try to decompile dead parts of code (if there are any)   
  11.          -dis     - disassembler only (disassembler)   
  12.          -f       - generate fully qualified names (fullnames)   
  13.          -ff      - output fields before methods (fieldsfirst)   
  14.          -i       - print default initializers for fields (definits)   
  15.          -l<num></num>  - split strings into pieces of max <num></num> chars (splitstr)   
  16.          -lnc     - output original line numbers as comments (lnc)   
  17.          -nl      - split strings on newline characters (splitstr)   
  18.          -noconv  - don't convert Java identifiers into valid ones (noconv)   
  19.          -nocast  - don't generate auxiliary casts   
  20.          -nocode  - don't generate the source code for methods   
  21.          -noctor  - suppress the empty constructors   
  22.          -nodos   - turn off check for class files written in DOS mode   
  23.          -noinner - turn off the support of inner classes   
  24.          -nolvt   - ignore Local Variable Table entries (nolvt)   
  25.          -nonlb   - don't insert a newline before opening brace (nonlb)   
  26.          -o       - overwrite output files without confirmation   
  27.          -p       - send all output to STDOUT (for piping)   
  28.          -pa  <pfx></pfx> - prefix for all packages in generated source files   
  29.          -pc  <pfx></pfx> - prefix for classes with numerical names (default: _cls)   
  30.          -pe  <pfx></pfx> - prefix for unused exception names (default: _ex)   
  31.          -pf  <pfx></pfx> - prefix for fields with numerical names (default: _fld)   
  32.          -pi<num></num> - pack imports into one line using .* (packimports)   
  33.          -pl  <pfx></pfx> - prefix for locals with numerical names (default: _lcl)   
  34.          -pm  <pfx></pfx> - prefix for methods with numerical names (default: _mth)   
  35.          -pp  <pfx></pfx> - prefix for method parms with numerical names (default:_prm)   
  36.          -pv<num></num> - pack fields with the same types into one line (packfields)   
  37.          -r       - restore package directory structure   
  38.          -s <ext></ext> - output file extension (default: .jad)   
  39.          -space   - output space between keyword (ifwhile, etc) and expression   
  40.          -stat    - show the total number of processed classes/methods/fields   
  41.          -t<num></num>  - use <num></num> spaces for indentation (default4)   
  42.          -t       - use tabs instead of spaces for indentation   
  43.          -v       - show method names while decompiling   
  44.   
  45.   
  46. /*  
  47.  DECOMPILATION REPORT  
  48.  
  49.  Decompiled from: D:\Program Files\MyEclipse 6.0\jre\lib\rt.jar  
  50.  Total time: 141 ms  
  51.  Jad reported messages/errors:  
  52.  Exit status: 1  
  53.  Caught exceptions:  
  54. */  
  55.   
  56. 解决方法:下载Jad(我附带了一个),放在jre\lib\下面,或者设置Jad的全路径名   


反编译工具jad简单用法
以下假设jad.exe在c:\java目录下
一、基本用法
Usage:    jad [option(s)]
直接输入类文件名,且支持通配符,如下所示。
c:\java\>jad example1.class
c:\java\>jad *.class
结果是将example1.class反编译为example1.jad。将example1.jad改为example1.java即得源

文件。

二、Option -o
不提示,覆盖源文件
三、Option -s
c:\java\>jad -sjava example1.class
反编译结果以.java为扩展名。

四、Option -p
将反编译结果输出到屏幕
c:\java\>jad -p example1.class
将反编译结果重定向到文件
c:\java\>jad -p example1.class>example1.java

五、Option -d
指定反编译的输出文件目录
c:\java\>jad -o -dtest -sjava *.class

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值