View the source code of the JDK class library in Eclipse

View the source code settings of the JDK class library in Eclipse : 1. Click " window " -> "Preferences" -> "Java" -> "Installed JRES" 2. At this time , there is a list pane to the right of "Installed JRES" , which lists The JRE environment in the system is selected, select your JRE , and then click "Edit..." on the side, a window (Edit JRE) will appear 3. Select this item in the rt.jar file: " c:\program files \java\jre_1.5.0_06\lib\rt.jar " click the " + " sign on the left to expand it, 4. After expanding, you can see " Source Attachment:(none) ", click this item, click the button on the right " Source Attachment... " ,choose your
 


 

" src.zip " file in the JDK directory


5. Click "ok" all the way to end. dt.jar is a class library about the runtime environment , mainly the swing package tools.jar is a class library about some tools
 
 

rt.jar contains the basic class library of jdk , which is the class file of all the classes you see in the java doc

Usage:  
You can select the name of a type, method or field in the Java source code editor or code snippet editor test window, and then open the editor for the element's definition.
In the Java editor, select the name of the type, method, or field. You can also just click once in the name. Do one of the following: 1. From the menu bar, select Browse > Open Statement 2. From the editor's pop-up menu, select Open Statement 3. Press F3 
 
 
 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325551209&siteId=291194637