Java compiler level does not match the version of the installed Java project facet.
在工程目录下的.settings文件夹里,打开org.eclipse.wst.common.project.facet.core.xml文件,其内容是:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="J2EE Runtime Library"/>
<fixed facet="java"/>
<fixed facet="jst.utility"/>
<installed facet="java" version="1.5"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>
删除中间几行,只留下下面三行即可解决此问题
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
</faceted-project>
在工程目录下的.settings文件夹里,打开org.eclipse.wst.common.project.facet.core.xml文件,其内容是:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="J2EE Runtime Library"/>
<fixed facet="java"/>
<fixed facet="jst.utility"/>
<installed facet="java" version="1.5"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>
删除中间几行,只留下下面三行即可解决此问题
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
</faceted-project>