Java反编译工具Java Decompiler插件,
Java反编译工具Java Decompiler插件,
网上经常会下载到一些jar文件和war文件,这些文件里面都是classes文件,通过“Java Decompiler”可以反编译(查看)里面的源代码,而且还可以批量保存jar文件和war文件里面的class文件。
1、官方网站:http://java.decompiler.free.fr/
2、批量反编译,即将jar档里面所有的classes文件反编译成java文件。
步骤:【File】->【Save JAR sources】即可。
3、技巧:
该工具默认不支持war格式,其实我们只要将该文件的后缀名改为jar可以了。
附:eclipse插件,即时反编译插件 JadClipse 使用 http://java.decompiler.free.fr/?q=jdeclipse#install
1、主页
2、jar档下载
3、反编译工具jad 主页和下载
4、安装和使用:
Installation
- Put the JadClipse JAR file into the plugins folder of your Eclipse installation.(将下载的jar档拷贝到eclipse下的plugins文件夹 )
- Restart Eclipse (eclipse -clean )(重新启动eclipse,执行【Project】-》【Clean】 ).
- Get Jad .(下载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 )(将得到的Jad文件解压,得到一个jad.exe的可执行文件,然后再eclpse进行设置:【Window】 > 【Preferences...】 > 【Java】 > 【JadClipse】 > 【Path to Decompiler】,在输入框输入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.(【Window】 > 【Preferences...】 > 【General】 > 【Editors】 > 【File Associations】,将JadClass设置为class文件的默认打开工具。 )
----------------------------------
jadClipse: http://sourceforge.net/projects/jadclipse jadclipse_3.1.0.jar
jad: http://www.kpdus.com/jad.html jadnt158.zip
参考文档:http://dev2dev.bea.com.cn/bbs/servlet/D2DServlet/download/124-32364-190427-2623/EclipseJadClipse.pdf
安装插件:
最好用links方式安装jadclipse,好处多多!
解压缩jadnt158.zip,把jad.exe拷贝到jre的bin的目录下。或者把jad的执行文件的绝对路径加入到环境变量PATH中。
配置jadclipse
使用link方式安装,建立E:\eclipse3.2plugins\jadclipse3.2.0\eclipse\plugins的目录结 构,将jadclipse_3.2.0.jar放到plugins目录下面(注:其中E:\eclipse3.2plugins为你自己定义的一个专门放 置插件的目录)。再在%ECLIPSE_HOME%\links目录下面建立一个jadclipse3.2.2.link文件(该文件名随便取,保证后缀 为.link就OK).文件里面内容为:path=E:\\eclipse3.2plugins\\jadclipse3.2。
重新启动eclipse,打开window->preferences->java->jadClipse
Path to decomplier:指定反编译工具的jad文件所在的位置。这个必须配置正确要不编译出错。
我设置的是jad的jre路径。c:\jdk1.5\jre\bin\jad.exe
里面的选项可以根据自己的意愿自选。
把*.class文件的associated editors设置为jadClipse Class File Viewer做为默认项
可以反编译class文件了:
1.在eclipse的package explorer中双击class文件,或者右键open.
2.命令行运行方式.eg:d:\>jad *.class 反编译为*.jad.可以参考jadnt158.zip目录下的readme.txt
相关文章
- 暂无相关文章
用户点评