请问Eclipse调试中出现The source attachment does not contain the source for the file该怎么办?在调试时发现我导入的jar中的一个class进不去,提示说The source attachment does not contain the source for the file Element.class

来源:学生作业学帮网 编辑:学帮网 时间:2024/06/06 05:42:47

请问Eclipse调试中出现The source attachment does not contain the source for the file该怎么办?
在调试时发现我导入的jar中的一个class进不去,提示说The source attachment does not contain the source for the file Element.class
这个class在jdom.jar里,可是我之前已经导入这个jar了啊,就在工程的Referenced Libraries下面,请问这是怎么回事呢?
而且我发现任何class都打不开,比如在项目的JRE System library里的rt.jar里的java/applet/Applet.class,
也是提示说是source not found
The JAR file C:\Program Files\Java\jre6\lib\rt.jar has no source attachment.
可是这个jar明明在那里啊,难道Eclipse要有什么全局的路径设置吗?

是不是要看源代码,但是相关的类并没有关联源代码,在“提示说The source attachment does not contain the source for the file Element.class”的时候应该可以关联的,关联之后可看,前提是你要有这个类或者包的源代码