I have an existing project that uses
@Override annotation on methods that implement those declared by an interface is only valid from Java 6 onward. It's an error in Java 5.
Make sure that your IDE projects are setup to use a Java 6 JRE, and that the "source compatibility" is set to 1.6 or greater. Open the Window > Preferences dialog, and browse to Java > Compiler. There you can set the "Compiler compliance level" to 1.6.
Remember that Eclipse can override these global settings for a specific project, so check those too.
The error under Java 5 isn't just with Eclipse; using
javac directly from the command line will give you the same error. It is not valid Java 5 source code.
However, you can specify the
-target 1.5 option to JDK 6's
javac, which will produce a Java 5 version class file from the Java 6 source code.