找不到类文件编辑器冗余源

时间:2013-05-22 09:53:28

标签: java eclipse axis

在调试项目代码时(在Eclipse中),我看到了这条消息

Class File Editor
-----------------------------------------------------------------------------
Source not found

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

(Button)--->Change Attached Source...

当我按下按钮Change Attached Source...时,它会询问包含axis.jar来源的位置(但Call.class位于axis.jar内)。我确实已经在我的Java Build Path中拥有axis.jar,但即使再次定位,问题仍然存在。是因为我为调试一个类做了一些冗余,还是因为我在多个库中有axis.jar

1 个答案:

答案 0 :(得分:1)

这是因为你有.jar文件,但你没有附加源代码。你需要java反编译器来查看源代码,你也可以进行调试。你必须安装decompler插件(http://jd.benow.ca/jd-eclipse/update)来查看源代码。

编辑:它对rt.jar工作正常(根据我的观察),如果你在安装插件后出现上述错误..你需要一些配置,如下所示:

In Eclipse >>> window > preferences > General > Editors > File Associations > 
 1) Choose .class with out source from file types and chooese
 2) In Associated editors ..> add  > Choose "Class File Editor" > clic ok.
then set it as default.