多语言展示
当前在线:963今日阅读:195今日分享:14

如何解决Eclipse 中引用src.zip报错

引用src.zip时、报“rt.jar is not on its project's build path”的解决方法
方法/步骤
1

当通过引用src.zip想看JDK标准类的源码时、有时会报如下错误:“an error occurred while opening the source attachment form ”“jre\lib\rt.jar is not on its project's build path”

2

Open project properties.

3

Select Java Build Path node.

4

Select Libraries tab. Remove JRE System Library 一次

5

再次 Add Library JRE System Library之后重新启动eclipse 就可以了。

推荐信息