ycomp
ycomp

Reputation: 8583

Project won't compile in IntelliJ IDEA after adding Maven support because of complaints about the JDK version

I'm using IntellJ 14.1.4 Community Edition

My project compiled fine before (I have it set up to use the Eclipse compiler)

But I tried to Mavenize it...

I added Maven via the Add Framework | Maven command

Now my problem is (still using the Eclipse Compiler)...

It gives me error messages like:

Error:(21, 78) java: '<>' operator is not allowed for source level below 1.7

Which leads me to suspect that it is not compiling to 1.8

However, I didn't change anything other than Mavenizing it

The Project SDK in IDEA is set to use 1.8

I did notice some setting about bytecode being 1.5.. but i tried to change that to 1.8 but still get this error message.

Anyone have any clue what's going on?

Upvotes: 1

Views: 90

Answers (1)

ycomp
ycomp

Reputation: 8583

this was essentially the correct advice of course - in the comments, however I had been trying to do it for a long time both via maven-compiler-plugin and properties... to no success, even though I was refreshing Maven after making changes to pom.xml. Finally, I restarted the IDE .. and .. it works! I can compile..

Upvotes: 1

Related Questions