Use eclipse to view the source code, press and hold Ctrl + left mouse button to display source not found

Problem: Query the underlying implementation method of the class when writing code, Ctrl+left mouse button, the pop-up interface shows source not found
Reason: The src.zip file in the JDK was not found in the eclipse development environment
Solution:
1. Click Window- preferences, find the installed JREs under Java,
insert image description here2. Click the jre1.8.0_131 package, select Edit on the right, click to pop up the edit window
insert image description here
3. Select c:\program files\java\jre 1.8.0-131\lib\rt.jar Under
source attachment, click source attachment on the right
insert image description here
4. Select external location, select external file, import the src.zip file in the jdk package, and click OK to save.
insert image description here

Guess you like

Origin blog.csdn.net/huangtao_1995/article/details/90345312