Description of eclipse related settings (4)

Five, JDK version settings in eclipse

  • 1. Click Window --> Preferences: Click> in front of Java, and then click Compiler Insert picture description here

  • Select the compiled version in the drop-down box behind JDK Compliance on the right. Note that the compiled version is consistent with the running version, and click Apply after setting.Insert picture description here

  • 2. Click Window --> Preferences: Click> in front of Java, and then click Installed JREsInsert picture description here

  • Click Add to pop up the Add JRE operation box, select Standart VM, and then click Next, as shown below:Insert picture description here

  • After clicking Next, click Directory and select the installation path of JDK/JRE on your computer:Insert picture description here

  • After clicking to select the folder, click Finish, the specified JDK will be added to the blank of Installed JREs, and the check mark in front of the newly added JDK will be checked.
    Insert picture description here

6. Adjust the JDK version of existing projects

  • Click on JRE System Library in the project --> right click Build Path --> Configure Build PathInsert picture description here

  • Click Configure Build Path to pop up a box: select Libraries, then Add Library --> JRE System Library --> Next
    Insert picture description here

  • After clicking Next, you can select the JDK version according to the following operations, and finally click Finish.
    Insert picture description here

  • Remove redundant JRE to prevent version conflicts: select the JRE System Library to be removed —> Remove, and finally click Apply --> Apply Close
    Insert picture description here

Guess you like

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