现在的位置: 首页 > 综合 > 正文

Eclipse: class file editor: source not found 问题解决办法

2019年05月19日 ⁄ 综合 ⁄ 共 543字 ⁄ 字号 评论关闭

Eclipse: class file editor: source not found。。。。问题

在搜了很多资料之后,自己试验总结了下面的办法:

在eclipse编辑器中,当点击某个类时,想看一下这个类的具体实现,但是总是出现  

Class File Editor
Source not found

The source attachment does not contain the source for the file xxx.class.
You can change the source attachment by clicking Change Attached Source below.

点击“Change Attached Source...”搜索按钮按照提示找到源文件就可以了

重点一句话:
找到相应的源代码,进行压缩,将压缩包添加即可;

比如你要找的是android代码的源文件,将 sdk的包 压缩一下 sdk.jar  ,再点击  add external file 或者 jar 都可以,这样就 ok 了!

另外如果就要查的是java 代码,将jdk的安装路径下的  Src.zip  添加即可  ,我的jdk安装路径是C:\Program Files\Java\jdk1.7.0_40

希望能帮助大家,也欢迎补充.......

抱歉!评论已关闭.