关于MyEclipse查看底层源码出现sou…

来源:互联网 发布:淘宝网手拿包 编辑:程序博客网 时间:2024/06/06 09:28

MyEclipse、Eclipse配置JAD

一、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)。UseEclipse code formatter(overrides Jad formattinginstructions)选项打勾,与格式化出来的代码样式一致。

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

注意事项:

     本人之前也按照上述步骤配置过,没什么问题,但是最近一次在新电脑上配置时出现了问题,在做好第二步中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 FileViewer设置成class文件的缺省打开方式。如果没有默认,可以在Eclipse的Windows——>Perference——>General->Editors->FileAssociations中修改“*.class”默认关联的编辑器为“JadClipse Class FileViewer”。设置完成后,双击*.class文件,eclipse将自动反编译。

  注意:jadclipse_版本号.jar的版本与eclipse的platform版本号相关,如果不匹配则会出现这样的错误:
An error has occurred when activatingthis view
Expecting non-static methodjadclipse.JadclipseBufferManager.createBuffer(Lorg/eclipse/jdt/core/IOpenable;)Lorg/eclipse/jdt/core/IBuffer;


原文引自:http://duanjiangong.iteye.com/blog/1186698

0 0