Eclipse -- Java compiler level does not match the version of the installed Java project facet问题解决

Eclipse出现

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

错误提示
Eclipse -- Java compiler level does not match the version of the installed Java project facet问题解决

原因:

Java Compiler选择的版本和’Project Facets’中指定的java版本不一致引起的。

修改为一致即可,

'Project Facets’版本的修改方式的有多种,

1、可以直接修改相应配置文件

在工程目录下.settings/org.eclipse.wst.common.project.facet.core.xml中修改facet="java"项;

Eclipse -- Java compiler level does not match the version of the installed Java project facet问题解决

2、通过Eclipse修改,右键项目=>Properties=>Project Facets修改Java版本

Eclipse -- Java compiler level does not match the version of the installed Java project facet问题解决