码迷,mamicode.com
首页 > 编程语言 > 详细

Java compiler与installed Java project face不匹配解决方法

时间:2015-08-30 08:49:45      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:

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 compiler与installed Java project face不匹配解决方法

标签:

原文地址:http://my.oschina.net/KingPan/blog/499141

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!