Eclipse is the most common software development tool for Java developers, and Eclipse is based on the JDK. Of course, in order to accommodate the needs of the project, sometimes we need to change the JDK version. This article is based on my actual experience, to introduce you, eclipse how to replace the JDK version. This paper takes JDK1.8 replacement as JDK1.6 as an example to illustrate. Method/Step
To view the project, the previously used JDK was 1.8.
Select the item, click "Build Path", then "Configure build Path" to enter the following interface.
To delete JDK1.8, click "Add Library", "JRE System Library", click "Next" button, select jdk1.6, click "Finish" button.
At this point you can see that the JDK has changed from 1.8 to 1.6 and click on the "OK" button. At this point, the execution program will report the following error.
Select the item and right-click on "Properties" to enter the Project property interface.
Click "Java Compiler", select "Compiler compliance Level", change to 1.6, click "OK" button. At this point, the execution of the program can be performed normally.