在调试我的项目代码时(在 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...
当我按下按钮更改附加源...
时,它会询问包含axis.jar
源的位置(但是Call.class
位于 axis.jar 内)。我的 Java 构建路径中肯定已经有 axis.jar,但即使再次定位,问题仍然存在。是因为我在调试类时做了一些冗余,还是因为我在多个库中有 axis.jar
?
最佳答案
这是因为,您有 .jar 文件,但没有附加源代码。你需要java反编译器来查看源代码,你也可以进行调试。您必须安装反编译器插件( 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.
关于java - 类文件编辑器未找到冗余源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16688799/