Eclipse中查看jar包中的源码

Java Decompiler Plugin For Eclipse IDE
1下载JAD :
1.5.8版本的jad在 http://yunpan.cn/cwynWKVFTmrnm 访问密码 6956
下载到的jad.exe放到某个目录中,例如 E:\jad\jad.exe

  1. 下载JADClipse插件:http://yunpan.cn/cwyXc5vpjGb3C 访问密码 3e54
    下载完成后将net.sf.jadclipse_3.3.0.jar放入Eclipse的plugins子目录下

  2. 启动Eclipse
    注意:eclipse需要重新启动

  3. 配置Jadclipse, 在 Windows - Preferences - Java - JadClipse下配置Jad的路径为 E:\jad\jad.exe
    只需编辑这一个值就ok了

如下图所示

这里写图片描述

5:eclipse重新启动,即可。

6:
In Eclipse, try F3 into any class which does not has the source, Jad will decompile it automatically.
see examples :
Java代码
1. jadclipse/// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
2. // Jad home page: http://www.kpdus.com/jad.html
3. // Decompiler options: packimports(3) radix(10) lradix(10)
4. // Source File Name: JSObject.java
5.
6. package netscape.javascript;
7.
8. import java.applet.Applet;
9. import sun.plugin.javascript.JSContext;
10.
11. // Referenced classes of package netscape.javascript:
12. // JSException
13.
14. public abstract class JSObject
15. {

运行过程中可能出现的错误:
1:

Java代码
1. /jadclipse/
2.
3. /*
4. DECOMPILATION REPORT
5.
6. Decompiled from: C:\Program Files\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\rt.jar
7. Total time: 16 ms
8. Jad reported messages/errors:
9. Exit status: 0
10. Caught exceptions:
11. java.io.IOException: Cannot run program “jad” (in directory “C:\Documents and Settings\Administrator.net.sf.jadclipse\1262594305781”): CreateProcess error=2, ϵͳÕҲ»µ½ָ¶
12. at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
13. at java.lang.Runtime.exec(Runtime.java:593)
14. at net.sf.jadclipse.JadDecompiler.decompile(JadDecompiler.java:160)
15.
16.
17. Decompiled from: /opt/ATG/ATG10.0.2/DAS/lib/servlet.jar
18. Total time: 26 ms
19. Jad reported messages/errors:
20. Exit status: 0
21. Caught exceptions:
22. java.io.IOException: Cannot run program “jad” (in directory “/home/citrisys/.net.sf.jadclipse/1311068558030″): java.io.IOException: error=2, No such file or directory
23. at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
错误原因:
Make sure your “jad.exe ” in existed in that folder.
配置Jadclipse, 在 Windows - Preferences - Java - JadClipse下
配置Jad的正确路径。

其他:
Juno Eclipse版本需要
配置文件关联关系,在Preference中file associations中配置.class & .class without source 的default editors为jad,到此就可以使用jad的反编译功能了。
配置所需的jar包和程序:http://yunpan.cn/cwyXbyYvTs4Bq 访问密码 50d4

出自《环球商城》CEO之手

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值