Java compiler level does not match报错

当在eclipse中创建或导入一个maven项目的时候,经常会遇到这个错误:
Java compiler level does not match the version of the installed Java project facet.
原因是项目的jdk编译版本和eclipse默认的jdk版本不一致。
1.先设置好eclipse的jdk版本,和本地系统的一致
Window–>preferences–>Java–>Installed JREs–>Add–>Standard VM–>Directory.
然后选择本地安装jdk的路径。
Java compiler level does not match报错

2.设置eclipse编译文件时用的版本。
Windows–>preferences–>java–>Compiler.
Java compiler level does not match报错

3.设置项目编译版本,设置成和上面一样的。
右键点击项目–>Properties–>Java Compiler.然后选择版本
Java compiler level does not match报错

4.右键项目–>Properties–>Project Facets–>Java.选择版本.
Java compiler level does not match报错

5.更新项目。

参考链接:http://www.cnblogs.com/lauer0246/p/5740572.html