0

Would anyone know why this happens? I seem to have Java 1.6 set, but I still get the @Override errors as though the system thinks I am on 1.5 which is strange.

Any thoughts on why this happens?

EDIT

The error message is

The method method(parametertypes) of type Type must override a superclass method

munyengm
  • 15,029
  • 4
  • 24
  • 34
Genadinik
  • 18,153
  • 63
  • 185
  • 284

2 Answers2

3

You need to set both the compliance level

enter image description here

and add the appropriate JRE library (right-click the project and select "properties" to get the screen below)

enter image description here

You may need to "clean" the project (Project > Clean...) after completing the above steps.

munyengm
  • 15,029
  • 4
  • 24
  • 34
  • thanks, I set the first screen as you have it. But how do I navigate to the second screen you posted? – Genadinik Jan 02 '13 at 12:48
  • Thank you ....Under build paths I have only Android libraries. From which directory should I add the jre? – Genadinik Jan 02 '13 at 12:53
  • the thing is that I do not have a JRE library in there. Which jar exactly do I need to add? Could you please outline the steps so I do not mess it up :) – Genadinik Jan 02 '13 at 12:57
  • Oh, you're developing an Android application? I'm not experienced with Android. However, I believe the required runtime is already included in the Android libraries themselves. So setting the compliance level should suffice. – munyengm Jan 02 '13 at 12:59
  • Ok seemed to have worked by the way :) ....fingers crossed and once again thank you :) – Genadinik Jan 02 '13 at 13:02
1

If you haven't already, navigate to Window -> Preferences -> Java -> Compiler and set the Compiler compliance level to 1.6.

This assumes that you've already set 1.6 on the project's build path.

mre
  • 43,520
  • 33
  • 120
  • 170