java compiler level does not match the installed java project facet 解决办法。

问题截图:

java compiler level does not match the installed java project facet 解决办法。

java compiler level does not match the installed java project facet 解决办法。


问题可能出现的原因:

由于工作的原因,Eclipse开发的Java项目的时候存在多人提交SVN上传或者下载项目内容,就有可能出现这个错误。项目没有提示报错,但是会有红色的”x”出现“java compiler level does not match the version of the installed java project facet”错误。


解决办法

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

或者直接 “Ctrl + H”查找 “installed”然后修改。

java compiler level does not match the installed java project facet 解决办法。

修改红色部分,让它与项目的编译器版本设置为自己本机的项目JDK版本一致即可。


修改后可以了,报错被取消。

java compiler level does not match the installed java project facet 解决办法。


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

java compiler level does not match the installed java project facet 解决办法。


3:还不行的话就把校验给关闭。 在Eclipse环境中,点击上面的Window–>Preferences–>Validation,在右边勾选如下,取消掉其他校验,如图所示。

然后在把项目Validation校验一下。

java compiler level does not match the installed java project facet 解决办法。