Maven项目 Java compiler level does not match the version of the installed Java project face

来源:互联网 发布:mac vim 退出编辑 编辑:程序博客网 时间:2024/05/29 18:00

这类警告处理办法:

Java compiler level does not match the version of the installed Java project face

原因是你的编译环境JDK与运行不匹配

处理如下:

Maven环境下,可以先指定JDK版本,

<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><source>1.7</source><target>1.7</target></configuration></plugin></plugins></build>
我这里指定的1.7版本

(Eclipse中JDK配置)

1.Window--->preferences--->java--->Installed JREs 可以指定自己需要的JDK版本

2.Window--->preferences--->java--->Compiler 指定编译的版本

3.选中项目--->properties--->project Facets--->java 指定一样的版本

4.选中项目--->Maven--->update project 

 OK




阅读全文
0 0