Ext.: http://blog.csdn.net/cherrycheng_/article/details/51004386
Original English Address: Http://stackoverflow.com/questions/18255474/debug-jdk-source-cant-watch-variable-what-it-is
Problem:
The effect after resolution:
Specific steps: 1. Make the Rt.jar package 1.1. New JDK7_SRC and Jdk7_rt-debug two folders in D disk
1.2. Copy JDK source code
The Java_home address configured in the environment variable or the src.zip in the external JDK installation directory that will be used
Copy to D:/jdk7_src, unzip. Effects such as
1.3. Select the source you want to compile
The original said, leaving java,javax,org three folders is enough, others can be deleted.
I just deleted the swing, and everything else stayed. Everyone can be free.
Swing Package Directory Location: com\sun\java\swing,javax\swing
1.4. Get the Java file name to process
Order and the following:
To see if there is anything in the auto-generated filelist.txt, the following operation is useless without data.
/B/S/x *.java>filelist.txt
1.5. Copy Jre/lib/rt.jar
Copy the Rt.jar under Jre/lib from the JDK installation directory (the directory where you copied the Src.zip) to the JDK7_SRC directory
1.6. Generate some Debug class folders
Execute the following command, after success, the Jdk7_rt-debug folder will produce some debugging class folders, such as:
If not, open jdk7_src/log.txt,ctrl+f to find "error" and resolve.
In general, the error of the Java path and path corresponding to the file deletion, and then execute dir/b/s/x *.java > Filelist.txt.
Javac-j-xms16m-j-xmx1024m-sourcepath D:\jdk7_src-cp D:\jdk7_src\rt.jar-d D: 2>&1
1.7. Package these files into a jar
Commands and effects such as
CD.. CD jdk7_rt-debug *
2. Use a rt.jar2.1 that can be debugged. Put Rt_debug.jar into the JDK
Add to java_home/jre/lib/endorsed Directory
2.2. Add Rt_debug.jar to the JDK used by eclipse
2.3. Add Rt_debug.jar's Source package
Note: If the Rt.jar package already exists under the original JRE directory, the location of the newly compiled Rt_debug.jar will be placed before the original jar package, as shown in.
2.4. Start debugging, you have succeeded!!
How Eclipse Debug JDK source (GO)