Hello.
Error compiling with OpenJDK. The situation is as follows. There is a code below:
class MyAction extends AbstractAction { @Override public void actionPerformed(ActionEvent arg0) { // что-то делаем... } }
It seems everything is fine, and Eclipse does not show an error. But when trying to compile from the console, an error pops up
"The method actionPerformed (ActionEvent) of type MyClass.MyAction must override a superclass method".
Such an error usually appears in cases where the signature or type of the value returned by the redefined function does not match, or, equivalently, when Override is placed on a method that does not have “prototypes” in the parent class. Secondly, IDE catches such errors, emphasizes and does not want to compile anything. And here everything looks fine. Which is typical, with the usual JDK this error does not appear. The package structure there, as I recall, is the same as in the standard JDK — java.awt.event.ActionEvent.
I also checked which java-libraries Eclipse sees in general, it turned out that only OpenJDK. Has anyone come across this?