power_settings_new

operator is not allowed for source level below 1.7

by
asked
0 votes
4k views
I am getting below error while compling code in Eclipse.

'<>' operator is not allowed for source level below 1.7

I have even changed my reference library to point to JDK 1.7.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by
selected by
0 votes
 
Best answer
In Eclipse,

go to Project > Properties

From left hand side, click Java Compiler.

Make sure that "Enable project specific settings" is checked.

Select "Compiler compliance level" equilent to JDK library you have included in your build path.

In your case it should be 1.7.
add
...