Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ: Set source compatability version plus make suggestions no longer suggest unsupported features

I have the SE JDK 1.8.0_45 installed on my computer. I want both source and target versions of the compiler to be 1.7.

I did so successfully in gradle, but I cannot figure out how to do that in IntelliJ IDEA 14.1.3 (Community Edition).

I want the IDE to give out errors when 1.8 features are used and I also do not want it to suggest my anything 1.8.

When I use 1.8 features (ex. a lambda expression) and then run gradle (which is set up properly as already mentioned) then the compile step will error, saying that it does not support what I typed, but the IDE is not giving me any error output before, which is what I want to achieve.

like image 455
randers Avatar asked Dec 20 '25 14:12

randers


1 Answers

Select your project, press CMD+ENTER -> PROJECT -> PROJECT SDK (pick your SDK, e.g. 1.8) and PROJECT LANGUAGE LEVEL (change it to level 7).

enter image description here

enter image description here

like image 110
Divers Avatar answered Dec 22 '25 02:12

Divers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!