Skip to content

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:

java: diamond operator is not supported in -source 1.5
(use -source 7 or higher to enable diamond operator)

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


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


As this cool guy mentioned here: