class资料反编译工具

class文件反编译工具


有时候为了查看第三方jar的class文件,对应的源代码,我们需要将class文件,进行反编译。
在众多的反编译工具中,个人觉得jd-gui工具挺好用的。可以在http://jd-gui.softpedia.com/查看该项目的信息。
该工具有桌面版和eclipse插件版
JD-GUI工具的桌面版,下载地址:http://java.decompiler.free.fr/
JD Eclipse是eclipse插件版,下载地址:http://java.decompiler.free.fr/?q=jdeclipse


按照官方网页的指导,采用eclipse在线安装方式后,虽然安装成功。但是重启eclipse,
过几秒后eclipse自动关闭。原因是eclipse.ini文件中指定的JVM内存不够大。

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms80m
-Xmx512m
 

 

这样虽然eclipse不会再关闭,但是感觉还是不太稳定,偶尔还是会出现自动关闭的情况。
建议采用本地安装方式,直接拷贝jd-eclipse插件的内容到eclipse的安装目录,也许这样也许会好些。

还可以参考,使用Eclipse Class Decompiler插件
http://www.blogjava.net/cnfree/archive/2012/10/30/390457.html