View the source code of the JDK class library in eclipse !!!
Settings:
1. Click "window"-> "Preferences"-> "Java"-> "installed jres"
2. in this case, the right side of "installed jres" is the List Pane, listing the system's JRE environment. Select Your JRE and click "Edit... ", a window appears (edit JRE)
3. Select the Rt. jar file: "C: \ Program Files \ Java \ jre_1.5.0_06 \ Lib \ RT. Jar"
Click "+" on the left to expand it,
4. after expansion, You can see "Source attachment :( none)", click this item, and click "Source attachment... ", select the “src.zip file under your JDK directory.
5. Click "OK" all the way to the end.
DT. jar is a class library about the runtime environment, mainly a swing package.
Tools. jar is a class library for some tools.
Rt. jar contains the JDK base class library, which is the class file of all classes you see in Java Doc.
Usage:
You can select the type, method, or field name in the Java source code editor or code fragment editing test window, and then open the editor for element definition.
In the Java Editor, select the type, method, or field name. You can also click it only once in the name.
Perform one of the following operations:
1. Select Browse> open declaration from the menu bar
2. From the editor pop-up menu, select open declaration
3. Press F3