Why does Eclipse Kepler SR1 error with : JAX-RS 2.0 requires Java 1.7 or newer

人盡茶涼 提交于 2019-11-30 09:03:09

Delete the .project file and banish it from your source control. Instead of using Import -> Existing Project, use Import -> Maven project, and let m2e configure your Eclipse project.

It's a bug, fixed in Luna if not SR2. http://bugs.eclipse.org/416704

If the intention is to just get rid of these errors then you can simply right click on the errors in the "Marker View" and click delete.

I know you can't change your 1.6 JDK, but the following solution might help other people:

In my case, I have both JDK 1.6 and 1.7. I've tried several suggested solutions without any success.

Hence, in my pom.xml I changed from jdk 1.6 to jdk 1.7:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
    <configuration>
        <source>1.7</source>
        <target>1.7</target>
    </configuration>
</plugin>

Using jdk 1.7 worked for me, although in my facets is setted the 1.6 (because my intention was use jdk 1.6).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!