Eclipse反编译工具Jad及插件JadClipse配置(转)

时间:2022-09-02 17:49:12

Jad是一个Java的一个反编译工具,是用命令行执行,和通常JDK自带的java,javac命令是一样的。不过因为是控制台运行,所以用起来不太方便。不过幸好有一个eclipse的插件JadClipse,二者结合可以方便的在eclipse中查看class文件的源代码。下面介绍一下配置:
    A.下载JadClipse,http://jadclipse.sourceforge.net/wiki/index.php/Main_Page#Download,注意选择与eclipse版本一致的版本,我用的是Eclipse3.4,所以选择下载版本net.sf.jadclipse_3.3.0.jar
    B.下载Jad,http://www.varaneckas.com/jad,下载相应版本
    C.将下载下来的Jadclipse,如net.sf.jadclipse_3.3.0.jar拷贝到Eclipse下的plugins目录即可。当然也可以用links安装,不过比较麻烦。
    D.将Jad.exe拷贝到JDK安装目录下的bin文件下(方便,与java,javac等常用命令放在一起,可以直接在控制台使用jad命令),我的机器上的目录是D:\Program Files\Java\jdk1.6.0_02\bin\jad.exe
    F.然后,重新启动Eclipse,找到Eclipse->Window->Preferences->Java,此时你会发现会比原来多了一个JadClipse的选项,单击,会出现,如下:Eclipse反编译工具Jad及插件JadClipse配置(转),在Path to decompiler中输入你刚才放置jad.exe的位置,也可以制定临时文件的目录,如图所示。。当然在JadClipse下还有一些子选项,如Debug,Directives等,按照默认配置即可。
    G.基本配置完毕后,我们可以查看一下class文件的默认打开方式,Eclipse->Window->Preferences->General->Editors->File Associations,我们可以看到下图:
Eclipse反编译工具Jad及插件JadClipse配置(转),我们可以看到class文件的打开方式有两个,JadClipse和Eclipse自带的Class File Viewer,而JadClipse是默认的。
    H.全部配置完成,下面我们可以查看源码了,选择需要查看的类,按F3即可查看源码,如查看Annotation中的Target,使用jad查看源码如下:
Eclipse反编译工具Jad及插件JadClipse配置(转)大家可以看到最上面的一行
"/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.",说明是由jad反编译的。

PS:网上说对于存在源代码的类,它不会强行反编译,也就是说它还是会用eclipse自带的Class File Viewer查看class文件。这个我还没有进行过验证。 另外附上我用的jad和jadclipse的压缩包,方便大家下载:/Files/landon/DeComiler.rar

Installation

  • Put the JadClipse JAR file into the plugins folder of your Eclipse installation.
  • Restart Eclipse (eclipse -clean).
  • Get Jad.
  • Put the Jad executable into a directory that is in the execution path of your operating system. Alternatively, you can configure the path to the Jad executable under Window > Preferences... > Java > JadClipse > Path to Decompiler. (Set the full path, e.g. C:\Program Files\Jad\jad.exe)
  • Go to Window > Preferences... > General > Editors > File Associations and make sure that the JadClipse Class File Viewer has the default file association for *.class files.

Troubleshooting

The JadClipse plug-in is not activated when I start Eclipse.
You'll need to launch Eclipse with the -clean flag to allow the environment to detect the plug-in. Subsequent launching of Eclipse won't require the -clean flag.
eclipse -clean
The Eclipse Class File Viewer instead of the JadClipse Class File Viewer is opened.
Go to Window > Preferences... > General > Editors > File Associations and make sure that the JadClipse Class File Viewer has the default file association for *.class files.
The JadClipse Class File Viewer does not show the decompiled source.
If the editor contains the following text segment JadClipse was not able to execute the Jad binary. Make sure that the path to the binary (Path to Decompiler) is set correcly in the preferences.
/*jadclipse*/

/*
DECOMPILATION REPORT Decompiled from: D:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar
Total time: 16 ms
Jad reported messages/errors:
Exit status: 0
Caught exceptions:
java.io.IOException: CreateProcess: (...)

http://jadclipse.sourceforge.net/wiki/index.php/Main_Page#Installation

http://jd.benow.ca/jd-gui/downloads/#jd-gui

jd-gui

http://jd.benow.ca/jd-gui/downloads/jd-gui-0.3.6.windows.zip

http://blog.sina.com.cn/s/blog_437ff56b010166qb.html

Eclipse反编译工具Jad及插件JadClipse配置(转)的更多相关文章

  1. Eclipse反编译工具Jad及插件JadClipse配置

    Jad是一个Java的一个反编译工具,是用命令行执行,和通常JDK自带的java,javac命令是一样的.不过因为是控制台运行,所以用起来不太方便.不过幸好有一个eclipse的插件JadClipse ...

  2. 2: Eclipse反编译工具Jad及插件JadClipse配置

    Jad是一个Java的一个反编译工具,是用命令行执行,和通常JDK自带的java,javac命令是一样的.不过因为是控制台运行,所以用起来不太方便.不过幸好有一个eclipse的插件JadClipse ...

  3. Java反编译工具Jad及插件JadClipse配置教程

    Jad是一个Java的一个反编译工具,和eclipse的插件JadClipse,二者结合可以方便的在eclipse中查看class文件的源代码. 下面介绍一下配置: 下载JadClipse,http: ...

  4. Eclipse反编译工具Jad及插件

    Eclipse反编译工具Jad及插件下载路径 http://download.csdn.net/detail/lijun7788/9689312 http://files.cnblogs.com/fi ...

  5. Eclipse 反编译工具 jad

    ** 1 下载 jad工具 ** 2 将.exe文件放在jdk安装路径下,里面有java ,javac 等命令,然后将jad.jar放在eclipse的dropins目录下 ** 3 启动eclips ...

  6. Java 反编译工具 —— JAD 的下载地址(Windows版/Linux版/Mac OS 版)

    Java 反编译工具 —— JAD 的下载地址. 各种版本哦! Windows版,Linux版,Mac OS 版,等等 下载地址: http://varaneckas.com/jad/

  7. Java反编译工具Jad详解

    做项目过程中需要反编译一个jar包,于是作了一些学习,记录下来. Jad(JAva Decompiler)是一个Java的反编译器,可以通过命令行把Java的class文件反编译成源代码. 如果你在使 ...

  8. 反编译工具 jad

    JAD(Java Decompiler)是一个比较流行的Java反编译工具,可以从网站 http://www.varaneckas.com/jad/ 下载,有多个系统下的应用程序,包括Windows. ...

  9. java反编译工具jad

    下好以后解压就可以用了,软件就只有一个exe文件和一个帮助文件.在众多的JAVA反编译工具中,有几种非常著名的工具使用了相同的核心引擎——JAD,其中主要包括:FrontEnd Plus.mDeJav ...

随机推荐

  1. 数据库的快照隔离级别(Snapshot Isolation)

    隔离级别定义事务处理数据读取操作的隔离程度,在SQL Server中,隔离级别只会影响读操作申请的共享锁(Shared Lock),而不会影响写操作申请的互斥锁(Exclusive Lock),隔离级 ...

  2. Installshield如何实现升级覆盖文件

    这个简单的问题,问过的人不计其数,但是反馈者寥寥,并且往往不能顺利达成目标,只能采取复杂方式来实现,这里吐槽一下IS的帮助文档,很庞大很全,但是有些小技巧就是不讲. 网友冰雪孤独哥今天提供了及时的反馈 ...

  3. mysql数据库、表、字段、记录:增、删、改、查

    /* 结构:数据库.表.字段.记录 操作:增删改查 */ -- 1.数据库:增删改查 create datebase if not exists jkxy; drop database if exis ...

  4. D3.js 插入元素,删除元素

    插入元素涉及的函数有两个: 一.append():在选择集末尾插入元素 假设有三个段落元素 <p>Apple</p> <p>Pear</p> <p ...

  5. javascript 文本框中&comma;判断回车键触发事件 兼容IE&amp&semi;FireFox

    1.onkeypress&onkeydown区别 onkeypress 事件在用户按下并放开任何字母数字键时发生.但是系统按钮(例如:箭头键.功能键)无法得到识别. onkeydown 事件在 ...

  6. A better way to learn D3 js - iLearning D3&period;js

    iLearning D3.js Basic is an iPad app to learn and code with D3. In 1.1 version, new tutorial is prov ...

  7. Fast InvSqrt&lpar;&rpar;(平方根倒数速算法)

    浮点数的平方根倒数常用于计算正规化矢量.3D图形程序需要使用正规化矢量来实现光照和投影效果,因此每秒都需要做上百万次平方根倒数运算,而在处理坐标转换与光源的专用硬件设备出现前,这些计算都由软件完成,计 ...

  8. 省市区三级联动(jquery&plus;ajax)(封装和不封装两种方式)-----2017-05-15

    首先,要实现如下图效果, 1.要理清思路: 先做出三个下拉菜单----根据第一个下拉菜单的value值获取第二个下拉列表的内容,第三个同理. 2.用到的数据库表:Chinastates表 规律:根据国 ...

  9. xShell终端下中文乱码问题

    今天,可能是因为不小心中途打断了xShell更新,结果打开xShell发现里面的中文全成了乱码.于是去网上查了一下原因.  更新xshell(xshell5)以及其他终端中文乱码的原因无非有三种 (1 ...

  10. 测试覆盖率工具EclEmma安装与使用

    此文来自于:https://www.cnblogs.com/cnsdhzzl/p/7638883.html EclEmma的简介 一个优秀的开源软件测试工具 eclipse的一个插件 能够对由 Jav ...