It can be resolved as follows:
- Go to Project properties.
- Then 'Java Compiler' -> Check the box ('Enable project specific settings')
- Change the compiler compliance level to '5.0' & click ok.
Do rebuild. It will be resolved.
Also, click the checkbox for "Use default compliance settings".
Select the checkbox for "Use default compliance settings"
It can be resolved as follows:
Go to Windows-> preferences.
Then 'Java-> Compiler' -> Compiler compliance level: was set to 1.7 ->apply->ok
I'm currently working with Eclipse Luna. And had the same problem. You might want to verify the compiler compliance settings, go to "Project/Properties/Java Compiler"
The Compiler compliance level was set to 1.4, I set mine to 1.5,(and I'm working with the JDK 1.8); it worked for me.
And if you had to change the setting; it might be useful to go to "Window/Preferences/Java/Compiler" And check to see that the Compiler compliance level is 1.5 or higher. Just in case you have a need to do another Java project.
No comments:
Post a Comment