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

  解决编译器版本和jdk版本不一致问题:

1、查看项目的编译器版本设置,在Eclipse环境中,鼠标右键选择项目,点击Properties,选择Java Compiler,可以在窗口右边看到编译器版本,如图所示:

2、在资源管理器下,找到项目所在的目录,在.settings子目录里面,用文本编辑器打开org.eclipse.wst.common.project.facet.core.xml配置文件,如图所示:

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <runtime name="Apache Tomcat v7.0"/>
  <fixed facet="jst.web"/>
  <fixed facet="wst.jsdt.web"/>
  <fixed facet="java"/>
  <!-- version设置成与编译器版本一致即可 -->
  <installed facet="java" version="1.7"/>
  <installed facet="jst.web" version="2.5"/>
  <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

  问题解决。

原文地址:https://www.cnblogs.com/wanghaichao/p/9290307.html