IntelliJ: install source compatibility version plus suggestions no longer offer unsupported features

I have SE JDK 1.8.0_45

installed on my computer. I want the source and target versions of the compiler to be 1.7.

I have done this successfully in gradle, but I cannot figure out how to do it in IntelliJ IDEA 14.1.3 (Community Edition).

I want the IDE to throw errors when using 1.8 functions, and I also don't want it to offer me something 1.8.

When I use 1.8 functions (like a lambda expression) and then run gradle (which is set up correctly, as mentioned) then the compilation step will fail stating that it doesn't support what I typed, but the IDE doesn't give me any the error output is what I want to achieve.

+3


source to share


1 answer


Select a project, press CMD + ENTER → PROJECT → PROJECT SDK (select SDK like 1.8) and PROJECT LANGUAGE LEVEL (change it to level 7).

enter image description here



enter image description here

+3


source







All Articles