Reputation:
So I have a project where the Java Compiler being used is 1.7. But in the project facet the Java version is 1.6. So I get the following error:
So I have 2 choices, I can either change my compiler version down to 1.6 or I can change my project facet version up to 1.7. I don't want to do the former though, when I change my compiler level down to 1.6 then I can't use diamond operators and, well I want all those java 7 features! So, I need to change my facet version up to 1.7. But alas, when I try and do it, 1.7 isn't even available:
So I ask you... why? :\
Upvotes: 2
Views: 3279
Reputation: 2139
for maven project you can add such properties
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
Upvotes: 1
Reputation: 1539
Sorry... I don't know why that is happening... I had similar problem today.
But to fix your problem, you can go to yourproject/.settings/org.eclipse.wst.common.project.facet.core.xml and change there manually. refresh your project and it should be good to go. :)
You will be looking for something like
<installed facet="java" version="1.7"/>
Upvotes: 4