An error is reported after eclipse changes the JDK version

In the actual development process, we may need to change the JDK version due to the needs of the project. However, an error will be reported after replacement, as follows:

Java compiler level does not match the version of the installed Java project facet.

Solution:

Step 1: set the eclipse JDK version

Windows—-> Preferences—-> Java—-> Installed JREs

 

Step 2: set the JDK compiled version

Windows—-> Preferences—-> Java—-> Compiler

 

Step 3: right click the project and set the JDK version of the project to the above unified version

Right click the item – > Properties—-> Java Compiler

 

  Note: the above versions should be unified

 

Similar Posts: