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.
/////////////////////////////////////////////
我看到有些人的回答:
/////////////////////////////////////////////
The jar file rt.jar has no source attachment.
You can attach the source by cliking Attack Source below:
解决方法:
因为rt的source在jdk目录的src.zip文件里,所以找到jdk目录下的src.zip就行了。
/////////////////////////////////////////////
我的问题是:
这里的source是指的原文件吗?
在弹出的对话框中,可以添加到文件可以是jar或zip,这说明源文件可以以jar形式存在吗?
如何根据缺少的包,找到对应的文件,比如缺少的是rt.jar,是怎么知道对应的文件是src.zip呢?