Yesterday I made a project in eclipse, and it was working, compiling. I used Eclipse Galileo for Java EE. Today I open eclipse and see lots of errors saying that stuff is no
I had the same issue after I installed Eclipse on Centos 7.
However in my case changing the Compiler compliance level did not fix the problem.
To fix the problem I changed the Eclipse Installed JREs Window->Preferences->Java->Installed JREs path, which was /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64 to an Oracle JDK at /usr/lib/jdk1.8.0_121-linux-x64
After this change the problem went away.
Check whether this works:
Properties
Java Compiler
node in the left tree.Compiler compliance level
to 1.5 or more.I had the same issue. For me, my project's compiler settings were imported from my Workspace Configuration settings, which was set to 1.8...
I tried switching compiler levels and rebuilding, but no luck. What did the trick though, was the following:
On your file system
Navigate to your project.
Delete the .settings folder.
Delete the .project file
In Eclipse:
Delete the project from your workspace - Ensure that you do not check the "Delete project contents on disk..." checkbox
Import your project and allow it to build
and something interesting for GWT. even though i am using java 6, it throw me error saying source level should be 5 or later.
Click the error, use the auto correct of eclipse, it change the compliance level to 5, solved the problem.
If your JDK is already at or above 1.5 try changing your JDK compliance to something else, letting it build, and then back again.
Preferences
(Window -> Preferences)Java -> Compiler
Compiler compliance level
to some other valueApply
and allow eclipse to rebuildCompiler compliance level