有时Eclipe配置不好时,会出现source not found的问题。解决方法如下:

(1) 打开window种的preference

Eclipse查看源码显示Resource not found

(2) 选择Java中的 Installed JREs

Eclipse查看源码显示Resource not found

 

(3)  单击右侧的jre并进行Edit

Eclipse查看源码显示Resource not found

(4)选择rt.jar文件并单击Source Attachment

Eclipse查看源码显示Resource not found

(5) 选择Exterenal location,将Path选择为JDK下的src.zip文件即可。并确认依次选择OK-->Finish-->Apply and close.

     完成上述所有操作后即可正常查看原代码!

Eclipse查看源码显示Resource not found

Eclipse查看源码显示Resource not foundEclipse查看源码显示Resource not found
 

 

相关文章:

  • 2021-11-10
  • 2021-04-29
  • 2022-12-23
  • 2021-12-27
  • 2021-05-12
  • 2021-05-02
猜你喜欢
  • 2021-04-15
  • 2021-07-25
  • 2022-01-02
  • 2021-09-24
  • 2021-12-03
  • 2022-01-01
相关资源
相似解决方案