I’ve downloaded an open-source Java project, JMapViewer.
http://svn.openstreetmap.org/applications/viewer/jmapviewer/
After importing it into Eclipse, there are numerous compiler errors, all regarding @Override notations preceding methods which are being implemented from an interface. I completely understand this error, since I would only use the @Override notation for a method which overrides a superclass method (an extension, not an implementation), which I believe is the only intended usage (and even then I don’t think it’s required).
This project has not been maintained for 4 months, but it does have a long history of revisions and community contributions. I cannot figure out why those @Override annotations are there if they prevent it from compiling, but in my inexperience I have to consider that those who put them there, the previous project contributors, had some good reason that is not clear to me. The project documentation says it was intended for usage with JDK 1.5, so I’ve tried compiling it under 1.5, 1.6, and 1.7 alternately in Eclipse, and in each case the result is the same… the compiler is very unhappy with those notations being where they are.
So… what am I missing?
The documentation you’ve seen is correct.
@overrideshould be accepted on methods that implement an interface method, by the compiler since JDK 1.6Try compiling from the command line to make sure it’s not eclipse still using the 1.5 compiler.