Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use -source 7 or higher

While trying to build a project using intelliJ Ultimate 12 I am getting these errors

use -source or higher to enable diamond operator use -source 7 or higher to enable multi-catch statement 

I used the same code with same intelliJ Ultimate 12 on some other system and its working fine there. I want to know what configurations I need to set in my IDE to fix these build issues?

like image 300
coure2011 Avatar asked Feb 02 '13 07:02

coure2011


People also ask

How do I change my Java version?

In the Java Control Panel, click on the Java tab. Verify that the latest Java Runtime version is enabled by checking the Enabled box. Click OK in Java Control Panel window to confirm changes and close the window. Try to run same applet and verify it is now running using latest version of Java installed in your system.


1 Answers

the language level for a project is set in the project structure dialog: project structure dialog you want to make sure you set the language level to java 7, and the sdk accordingly

like image 140
radai Avatar answered Sep 21 '22 05:09

radai