Java compiler与installed Java project face不匹配解决方法
2015-08-30 07:58
513 查看
1. 错误截图
2.原因分析
This error is because of maven compiler plugin defaults. Which is currently 1.5. So if you are using java 1.6 for building your project, you are going to face this issue every time you run this command:
3. 解决方案
To solve this issue, you need to make one time update in your pom.xml file. This update is for overriding the default compiler level in maven compiler plugin.<plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins>
Update above compiler properties with your desired java version. And place this configuration inside “build” node in pom.xml file like this:
<build>
<finalName>JerseyHelloWorld</finalName>
<plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins>
</build>
Above change will correct the error.
引用:Solved: Java compiler level does not match the version of the installed Java project facet
相关文章推荐
- java 自动装箱自动拆箱
- UBUNTU 查看 JAVA安装路径
- Java 7 并发编程实战手册目录
- 从零开始学Java之出入门卫管理系统(四)
- 从零开始学java之出入门卫管理系统(三)
- struts “could not execute statement; SQL [n/a]; constraint [null];” 错误
- 【Java-加密算法】对称加密、非对称加密、单向散列
- openJDK7 编译过程 ~ Mac OS X 环境
- Java集合类型之HashMap
- Introduction to Java Programming编程题10.7<ATM>
- BUG:eclipse SVN不显示Repository和git不匹配repository
- java排序方法
- javaWeb解决中文乱码问题终极办法字符流转换
- java_基础篇_01(补)
- javaWeb利用Filter解决中文乱码问题
- Java-instanceof总结
- Java-instanceof总结
- Java-instanceof总结
- shirt----spring security的另外一个选贤
- Java学习之旅_基础篇_05