Skip to content
Advertisement

IntelliJ IDEA 13 uses Java 1.5 despite setting to 1.7

Despite specifying JDK 1.7 in all project settings (including in File -> Project Structure -> Project :: Project SDK), the following error is produced by IntelliJ 13 when trying to compile some simple Java 7 code which does use the diamond operator:

JavaScript

Is there any other place in the configuration where the expected -source 7 option should be enabled?

Advertisement

Answer

If nothing of this helps (my case), you can set it in your pom.xml, like this:

JavaScript

As this cool guy mentioned here: https://stackoverflow.com/a/25888116/1643465

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement