java - 类文件编辑器未找到冗余源

标签 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...

当我按下按钮更改附加源...时,它会询问包含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/

相关文章:

java - 从数组中赋值时出现 Char 数组编译时错误

java - 比较两个对象变量时出现问题

eclipse - 部署到 FireFly 的 JSF 异常,标记名为 inputFile null handler-class

java - Hybris 服务器的 TLS 1.2 配置

java - 如何决定在 Java Web 服务中使用什么框架?(SOAP)

在 jqplot 中设置 y Axis 刻度/值的格式

java - 初始化上下文时不会调用 ServletContextListener.contextInitialized

java - 我必须在每个方法中写入 "BufferedReader ..."吗?

java - JSF 标签未呈现 - FacesServlet 可能无法正常工作?

java - eclipse - 仅在特定类和该类的所有子类中查找引用