Eclipse 导入 Web 项目时常见的错误及解决办法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/young2415/article/details/86064337

1.The compiler compliance specified is 1.5 but a JRE 1.8 is used

右键点击项目>Properties>Java Compiler>将Compiler compliance level改为1.8
在这里插入图片描述

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

在资源管理器下,找到项目所在的目录,在.settings子目录里面,用文本编辑器打开org.eclipse.wst.common.project.facet.core.xml配置文件,如图所示:
在这里插入图片描述
修改红色画线部分,让它与项目的编译器版本设置保持一致即可。

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

猜你喜欢

转载自blog.csdn.net/young2415/article/details/86064337