1. Eclipse 快捷键 ctrl + 鼠标左键可以查看Java 类/函数的源代码

 

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

(1) 打开window种的preference

Eclipse 查看源代码Source not found

(2) 选择Java中的 Installed JREs

Eclipse 查看源代码Source not found

 

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

Eclipse 查看源代码Source not found

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

Eclipse 查看源代码Source not found

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

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

Eclipse 查看源代码Source not found

Eclipse 查看源代码Source not foundEclipse 查看源代码Source not found
 

 

相关文章:

  • 2021-08-24
  • 2021-08-20
  • 2021-05-28
  • 2022-01-08
  • 2021-11-10
  • 2021-04-29
猜你喜欢
  • 2021-09-24
  • 2021-12-03
  • 2021-12-27
  • 2021-06-10
  • 2021-04-15
相关资源
相似解决方案