Alex Rivera | Logout

Can I get Java 5 to ignore @Override errors?

Asked 2010-01-25T21:59:01.677
10

Possible Duplicate:
Why does Eclipse complain about @Override on interface methods?

I have some Java code that was written using Eclipse and the Java 6 SDK, so methods that implement an interface are annotated with @Override - an annotation that is legal in Java 6, but not in Java 5.

I'd like to compile the same code using the Java 5 SDK (javac on Mac OS X 10.5). Everything compiles and runs fine except for the @Override annotations. Is there any way I can get javac to ignore the @Override annotations for this project, or is the only solution to remove them all?

Edit
Report

1 Answer

-1

@Override is valid in java 5 -> http://java.sun.com/j2se/1.5.0/docs/api/index.html?java/lang/Override.html

I recommend that you check your project's compiler settings in Eclipse, perhaps at Project -> Compiler -> Error/Warnings -> Annotations?

answered 2010-01-25T22:05:16.890

Your Answer