Java compiler level does is not match the version of the installed Java project facet.
Elipse you can usually right-click on an item-->properties--> and then find the project facets and Java compiler two options to modify the JDK version that it uses. If you do not find the project facets option, you can refer to the following methods:
There is no project facets configuration option in Eclipse, you need to go to the. Settings folder of the current project to locate the Org.eclipse.wst.common.project.facet.core.xml file, which reads as follows:
<?xml version= "1.0" encoding= "UTF-8"?>
<faceted-project>
<fixed facet= "Wst.jsdt.web"/>
<installed facet= "java" version= "1.6"/>
<installed facet= "Jst.web" version= "2.5"/>
<installed facet= "Wst.jsdt.web" version= "1.0"/>
</faceted-project>
where <installed facet= "java" version= "1.6"/> This line is faceted project's compile-level configuration.
<installed facet= "Jst.web" version= "2.5"/> This line of configuration needs to be modified in some cases, such as building a Web project in MyEclipse, and then importing it into Eclipse Jee, Sometimes you need to modify this configuration.
After you save the configuration, the problem is resolved after you refresh and build the project.