eclipse Ctrl +左键查看源代码Source not found

作者:wendy | 创建时间: 2023-05-24
在使用Eclipse进行java编程时,有时我们需要查看一些类的源代码,这时ctrl+鼠标左键是个很常用的操作,但有时我们发现这个操作实现不了,经常显示Source not found。...
eclipse Ctrl +左键查看源代码Source not found

操作方法

打开Eclipse,点击Windows。

在Windows选项下,选择“perferences”。

在“perferences”窗口下,选择java->Incelled jres。

点击“jre8”,点击右侧“ Edit”。

在edit jre对话框中,找到以“rt.jar”结尾的文件。点击展开。

选择“ Source Attachment”。点击。

在 “Source Attachment”对话框下,选择”External location“。路径为安装java JDK时的路径,关键是在此路径下,找到src.zip,就行了。

看一下结果,如”Math“,按下ctrl,点击鼠标左键,即可查看其源代码。

点击展开全文

更多推荐