Search code examples
javaimportwindows-xpoverridingjdesktoppane

@Override error when java project transferred from ubuntu to xp


My current task is taking a Java project written and developed in Ubuntu NetBeans (extensively using the palette, which, it seems to me, locks me into continuing to use NB) and transferring it to XP, as it involves software that interfaces with a webcam and the client strictly uses XP. In Ubuntu, the project compiles correctly and completely, with the exception of the few functionality problems I was tasked to fix.

So using Subversion, I checked it into NB on a VirtualBox running XP, and added, as far as I could tell, all the correct libraries that were called in the code. A few problems remain, almost all related to @Override annotations above methods that are part of an inner class that extends org.jdesktop.application.Task<Boolean, Void>. I have researched this and have a very vague understanding of what @Override denotes, but am not sure how to apply it to my situation.

The consistency of the problem throughout multiple classes suggests I have not correctly done my classpath, but I cannot find any errors there. In your experience, what sort of problem do these circumstances suggest?

EDIT: I forgot to mention that I had already tried what seemed to be the most common suggestion; everything is freshly installed, the JDK used on both machines is 1.6.

EDIT EDIT: The error takes place inside:

private class TakeSnapshotTask extends org.jdesktop.application.Task<Boolean, Void>

And at the first line of the following:

@Override
protected Boolean doInBackground() 

I get the following error:

"method does not override or implement a method from a supertype"

It appears as though @Override denotes something similar to overloading operators as in C, only with methods. In this case, I'm starting to think the problem is that jdesktop's Task interface doesn't have the Boolean doInBackGround() method. I'm having a hard time pinning down the jdesktop API, however. I've added jdesktop as a tag.


Solution

  • Problem solved. A JAR file was missing from the library. It was news to me that the .class files within them were accessible, thanks to Ha!