MyElipes遇到 source not found解决方案

在用Myeclipse 或者是eclipse进行开发时候经常遇到这个问题。

 File class editor  source not found问题。原因很简单,就是因为这是一个源码包,相应的没有编辑器能够打开它。

MyElipes遇到 source not found解决方案

工具/原料

  •  myeclipse、eclipse

方法/步骤1

  1. 1

     首先,需要下载两个必须的插件包。

    一个是:准备反编译需要的jad.exe

    下载地址:http://varaneckas.com/jad/

    二个是:反编译编辑器net.sf.jadclipse_3.3.0.jar

    下载地址:http://sourceforge.net/projects/jadclipse/?source=dlp

    MyElipes遇到 source not found解决方案
  2. 2

     第二:把插件安装在Myeclise或eclipse中。

    1、对于jad.exe 。安装于你jdk的安装位置。

    2、net.sf.jadclipse_3.3.0.jar 在你的Myeclise或eclipse的dropins目录中。

    安装成功会有提示。

    MyElipes遇到 source not found解决方案
  3. 3

     第三:设置在在Myeclise或eclipse中的配置参数。

     

    MyElipes遇到 source not found解决方案
    MyElipes遇到 source not found解决方案
  4. 4

     第四:设置参数。

    在jadclipse-> debug勾选:output original line numbers as comments  在jadclipse->Misc勾选:covert unicode strings into  ANSI strings  在windows->preference->General->Editors->File Association将 JadClipse Class File Viewer设置为默认。

    MyElipes遇到 source not found解决方案
    MyElipes遇到 source not found解决方案
  5. 5

     第五:大功告成。

     

    MyElipes遇到 source not found解决方案
    END

注意事项

  •  两个插件必备。否则会出现IOException

查看java的class文件,在网络上搜索了一下资料,这样就很方便的去查看别人的代码 在myeclipse查看class文件,就像查看普通的java源文件一样,通过以下步骤可以做到: 安装设置步骤:1. 下载jadnt158.zip 。 2. 下载net.sf.jadclipse_3.3.jar(对应eclipse3.3) ,二者都可以去CSDN上下载。 3. 将jadnt158.zip 解压,拷贝jad.exe 到%JAVA_HOME%\bin\ 目录下。 4. 安装插件net.sf.jadclipse_3.3.jar (将此文件拷到eclipse 的plugins目录(%eclipse_home%\plugins)下,例如C:\MyEclipse Enterprise Workbench 6.5GA\eclipse\plugins下)。 5. 设定路径:进入Window -> Preferences -> Java -> JadClipse,Path to decomiler设置为jad.exe的绝对路径,例如C:\j2sdk1.4.2\bin\jad.exe,Directory for temporary files设置为存放临时文件的决对路径这里我把它设置为C:\Documents and Settins\桌面\.net.sf.jadclipse 。 6. 在Eclipse 的Windows—> Perferences—>General->Editors->File Associations 修改“*.class”默认关联的编辑器为“JadClipse Class File Viewer”。如果没有*.class,则点击“add"增加,如果没有jadclipse Class File Viewer,可以点击“Add-Internal Editors”,查找是否有jadclipse,若还是没有,则说明net.sf.jadclipse没有复制到正确的位置. 安装设置完毕,可以双击class文件,测试一下,正确的情况是:反编译成功,可以显示class文件(无需增加src源文件)为普通的java源代码样式,另外,在Myeclipse菜单栏上多出了一个JadClipse菜单. 现在可以通过myeclipse直接查看class文件,阅读代码效率高了许多~~~~~~ 安装时应注意:jadclipse的版本一定要和eclipse的版本一致!比如,我用的Myeclipse版本为6.5,其包含的eclipse版本为3.3。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值