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

时间:2021-02-14 10:29:33

从同事那里拷贝过来的web项目,导入到eclipse中,出现Java compiler level does not match the version of the installed Java project facet 问题.

如图所示:

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

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

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

修改红色画线部分,让它与项目的编译器版本设置保持一致。

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

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

========================================补充================================================

如果此时仍然报错,就要看看Tomcat中的jre配置是否是本地安装的jre了.新建server,默认的是"Workbench default jre"

如何修改?

如下图:

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

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