您的位置:首页 > 编程语言 > Java开发

Myeclipse配置jad,查看class文件

2012-07-07 16:45 381 查看
一、MyEclipse

第一步:

下载jad.exe文件和eclipse插件:http://www.varaneckas.com/sites/default/files/jad/jad158g.win.zip

或者

http://nchc.dl.sourceforge.net/sourceforge/jadclipse/net.sf.jadclipse_3.3.0.jar

第二步:

(1) 将jad.exe解压到java的jdk\bin目录下

(2) 将jadeclipse插件net.sf.jadclipse_版本号.jar 拷贝到myeclipse安装目录\Genuitec\Common\plugins\目录下。

(3) 在myeclipse安装目录下的dropins中创建eclipse文件夹,然后在eclipse文件夹中分别创建features、plugins文件夹,将 net.sf.jadclipse_3.3.0.jar 分别拷贝到features和plugins文件夹中。

(4)重新启动myeclipse后,配置jadeclipse插件

1)在eclipse窗口下,点击Window > Preferences > Java > JadClipse > Path to Decompiler。(设置jad的绝对路径,如 C:\java\Jad\jad.exe)。Use Eclipse code formatter(overrides Jad formatting instructions)选项打勾,与格式化出来 的代码样式一致。

2)在eclipse窗口下,点击Window > Preferences > Java > JadClipse > Misc,将Convert Unicode strings into ANSI strings选项打勾,避免反编译后可能出现的中文乱码。

注意事项:

本人之前也按照上述步骤配置过,没什么问题,但是最近一次在新电脑上配置时出现了问题,在做好第二步中1、2、3后重启MyEclipse后在点击Window > Preferences > Java 后并没有出现JadClipse,搞了蛮长时间都没弄出来,后来的解决方法是,将自己建的eclipse文件夹先移除,然后重启MyEclipse8.5,在关掉,在将刚刚移除的eclipse文件夹重新移入,在重启Myeclipse8.5就没什么问题了!

========================================

二、Eclipse

1、下载eclipse插件:jadclipse_版本号.jar

http://jadclipse.sourceforge.net/download.html

或者

http://nchc.dl.sourceforge.net/sourceforge/jadclipse/net.sf.jadclipse_3.3.0.jar

  2、 下载Jad反编译工具:http://www.varaneckas.com/sites/default/files/jad/jad158g.win.zip

  3、将jad反编译工具jad.exe放到jdk安装路径的bin目录下面,jadclipse_版本号.jar放到eclipse的安装目录下的plugins目录下。

  4、启动eclipse,打开:Window->Preferences->Java->JadClipse.

  Path to decompiler,这里设置反编译工具jad的全路径名,就是第三部jad.exe的路径。

  5、 安装完成后,eclipse自动将JadClipse Class File Viewer设置成class文件的缺省打开方式。如果没有默认,可以在Eclipse的Windows——> Perference——>General->Editors->File Associations中修改“*.class”默认关联的编辑器为“JadClipse Class File Viewer”。设置完成后,双击*.class文件,eclipse将自动反编译。

  注意:jadclipse_版本号.jar的版本与eclipse的platform版本号相关,如果不匹配则会出现这样的错误:

An error has occurred when activating this view

Expecting non-static method jadclipse.JadclipseBufferManager.createBuffer(Lorg/eclipse/jdt/core/IOpenable;)Lorg/eclipse/jdt/core/IBuffer;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐