Eclipse关联JDK源码

1、点【Window】->【Preferences】->【Java】->【Installed JRES】

2、此时"Installed JRES"右边是列表窗格,列出了系统中的JRE环境,选择你的JRE,然后点边上的 "Edit...", 会出现一个窗口(Edit JRE)

3、选中rt.jar文件的这一项,可以看到Source Attachment:(none),点这一项,点右边的按钮Source Attachment...,选择你的JDK目录下的src.zip文件

 

参考:

http://blog.csdn.net/weiwangchao_/article/details/25960961(以上内容参考此篇文章)

原文地址:https://www.cnblogs.com/EasonJim/p/7791971.html