Eclipse反编译工具Jad及插件JadClipse配置(转)
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的选项,单击,会出现,如下:,在Path to decompiler中输入你刚才放置jad.exe的位置,也可以制定临时文件的目录,如图所示。。当然在JadClipse下还有一些子选项,如Debug,Directives等,按照默认配置即可。
G.基本配置完毕后,我们可以查看一下class文件的默认打开方式,Eclipse->Window->Preferences->General->Editors->File Associations,我们可以看到下图:,我们可以看到class文件的打开方式有两个,JadClipse和Eclipse自带的Class File Viewer,而JadClipse是默认的。
H.全部配置完成,下面我们可以查看源码了,选择需要查看的类,按F3即可查看源码,如查看Annotation中的Target,使用jad查看源码如下:大家可以看到最上面的一行
"/*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配置(转)的更多相关文章
- Eclipse反编译工具Jad及插件JadClipse配置
Jad是一个Java的一个反编译工具,是用命令行执行,和通常JDK自带的java,javac命令是一样的.不过因为是控制台运行,所以用起来不太方便.不过幸好有一个eclipse的插件JadClipse ...
- 2: Eclipse反编译工具Jad及插件JadClipse配置
Jad是一个Java的一个反编译工具,是用命令行执行,和通常JDK自带的java,javac命令是一样的.不过因为是控制台运行,所以用起来不太方便.不过幸好有一个eclipse的插件JadClipse ...
- Java反编译工具Jad及插件JadClipse配置教程
Jad是一个Java的一个反编译工具,和eclipse的插件JadClipse,二者结合可以方便的在eclipse中查看class文件的源代码. 下面介绍一下配置: 下载JadClipse,http: ...
- Eclipse反编译工具Jad及插件
Eclipse反编译工具Jad及插件下载路径 http://download.csdn.net/detail/lijun7788/9689312 http://files.cnblogs.com/fi ...
- Eclipse 反编译工具 jad
** 1 下载 jad工具 ** 2 将.exe文件放在jdk安装路径下,里面有java ,javac 等命令,然后将jad.jar放在eclipse的dropins目录下 ** 3 启动eclips ...
- Java 反编译工具 —— JAD 的下载地址(Windows版/Linux版/Mac OS 版)
Java 反编译工具 —— JAD 的下载地址. 各种版本哦! Windows版,Linux版,Mac OS 版,等等 下载地址: http://varaneckas.com/jad/
- Java反编译工具Jad详解
做项目过程中需要反编译一个jar包,于是作了一些学习,记录下来. Jad(JAva Decompiler)是一个Java的反编译器,可以通过命令行把Java的class文件反编译成源代码. 如果你在使 ...
- 反编译工具 jad
JAD(Java Decompiler)是一个比较流行的Java反编译工具,可以从网站 http://www.varaneckas.com/jad/ 下载,有多个系统下的应用程序,包括Windows. ...
- java反编译工具jad
下好以后解压就可以用了,软件就只有一个exe文件和一个帮助文件.在众多的JAVA反编译工具中,有几种非常著名的工具使用了相同的核心引擎——JAD,其中主要包括:FrontEnd Plus.mDeJav ...
随机推荐
- Windows Phone 8.1 列表控件(1):基本
说到 List 控件,Windows Phone 8.1 上推荐使用的是 ListView 和 GridView. 而这两个控件实在太多东西可讲了,于是分成三篇来讲: (1)基本 (2)分组数据 (3 ...
- 关于TCP的两个小练习_第一个博客~
先来一个本地的,客户端发送请求,服务端接收请求的简单代码 1 package com.TCP.java; 2 3 import java.io.IOException; 4 import java.i ...
- python 自动化之路 day 00 目录
目录 初识Python Python基本数据类型 Python基础之函数 Python基础之杂货铺 模块 面向对象 网络编程 HTML CSS JavaScript DOM jQuery Web框架本 ...
- tomcat6.0添加ssi(*.shtml)配置
1.去掉tomcat6中conf/web.xml关于ssi的注释 <servlet> <servlet-name>ssi</servlet-name> <se ...
- 鼠标滑过提示title
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1. ...
- javascript 代码优化工具 UglifyJS
安装: 1. 安装 node.js 环境 (这个不用我教了吧,网上教程一大堆哦.) 2. 进入 https://github.com/mishoo/UglifyJS 右上角 “Download” Z ...
- 小米2s换了屏幕后不能近距离对焦,拆过后无法对焦?
主要问题就是小米2/2S手机中壳套后摄像头的位置,里面还有一个正方形的黑色塑胶垫片,一般拆机后这个垫片是不会掉出来的,所以一般上盖时也是直接把中壳合上后上螺丝. 这样安装基本会导致塑胶垫片把摄像头顶住 ...
- 【Winform】锐浪报表使用
在发开报表时,使用了锐浪报表. 需要注意的一些细节: 1.给staticbox设置文本,通过GridppReport的变量,使用ControlByName获取到控件后进行设置文字 _report.Co ...
- 玄机网C#论坛测试小游戏
http://files.cnblogs.com/ro4ters/EasyGame.zip http://www.xuanjics.com/thread-39-1-1.html 具体活动地址
- 【转】oracle中触发器中:new和:old 的使用方法
create or replace trigger TRI_PrintTest before delete or insert or update on TEST_EXAM --触发事件 for ea ...