解决Source Not Found问题

在eclipse里查看一些jar下的class文件,有时却会显示Source Not Found。
遵循以下操作即可解决:
1.从windows选项下选择”perferences”。
2.在”perferences”对话框下选择java->Installed JREs 。
3.选中”jre8”并点击右侧”Edit”。
4.在”Edit JRE”对话框中找到对应的jar,例如rt.jar,点击展开选择”Source Attachment”。
5.在”Source Attachment”对话框下,选择”External location”,路径设为JDK根目录,源文件就是该路径下的src.zip。
在这里插入图片描述 转载至:https://blog.csdn.net/qq_24241631/article/details/87880989