Eclipse related settings instructions-debug debugging into the JDK source code (6)

Eight, eclipse enters the JDK source code during debugging

  • Create a new Java project in eclipse: File --> New --> Java Project in the upper left corner
    Insert picture description here
  • After clicking Java Project, set the project name in the pop-up box, any project name, and finally click Finish:
    Insert picture description here
  • Find the root directory of the jdk installed on your computer, find the source code compression package src.zip in the root directory, and then decompress (the decompression location is not required):
    Insert picture description here
  • Back to the project, import the source code in the newly unzipped src into the src directory of the newly created project: project src --> right-click import and click:
    Insert picture description here
  • Click> in front of the first item General in the pop-up box, and then select File System in General
    Insert picture description here
  • After double-clicking File System, click Browser in the pop-up box, find the root directory of the jdk installation, and select the src folder, as follows:
    Insert picture description here
  • After clicking to select the folder, click the port in front of src in the pop-up box, a check mark appears, which means select all, and then click Finish below:
    Insert picture description here
  • After clicking Finish, the source file in src is imported into the project, but an error will be reported, so you don't need to pay attention to the error in the program.
    Insert picture description here
  • After importing the source file in the src into the project, export the project: Right-click the project --> Export
    Insert picture description here
  • After clicking Export, click the> in front of Java in the pop-up box, and then select the first JAR file --> Next.
    Insert picture description here
  • After clicking Next, click Browser in the pop-up box, select the export storage path (suggest to store directly in the root directory of jdk), the export result must be named rt_debug.jar, click save
    Insert picture description here
  • After clicking Save, the storage path is confirmed, and finally click Finish. A rt_debug.jar file will be generated below the corresponding path .Insert picture description here
  • Need to add the generated rt_degug.jar to eclipse: Window --> Preferences --> Click> in front of Java, and select Installed JREs in Java.
    Insert picture description here
  • Select the jdk used, and then click the second operation Edit JRE
    Insert picture description here
  • Add the exported rt_debug.jar to eclipse, the operations are as follows:
    Insert picture description here
  • Find the added rt_debug.jar in the JRE system libraries, and adjust the position of rt_debug.jar through the UP on the right side. It needs to be adjusted to the front of rt.jar .
    Insert picture description here
  • Click Finish after adjustment.
    Insert picture description here
  • Yes

Guess you like

Origin blog.csdn.net/Java_lover_zpark/article/details/105055636