getting compile error for diamond operator in idea ide

Ashish Yadav picture Ashish Yadav · Feb 13, 2014 · Viewed 12.3k times · Source

I am getting this error while trying to compile some simple source code in idea ide.

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

jdk is 1.7.40 from oracle

but where is this place to add this "-source 7" option?

i tried adding in ide settings but that had no effect.

Answer

user180100 picture user180100 · Feb 13, 2014

You need to set the project language level (default for all modules) and the module(s) language level

Project language level Module language level