views:

62

answers:

3

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 annotation above methods that are part of an inner class that extends org.jdesktop.application.Task. 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

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.

+1  A: 

My first thought would be case sensitivity, but that would usually manifest the other way (i.e. file is found in Windows but not in Linux). Could it be possible that you have files in your project with the same name but in different cases? In this case, Windows might just be finding a different (and apparently, wrong) version of some file compared to the case-sensitive match on Ubuntu.

In any case, it would probably help if you posted the actual error messages, rather than us having to guess the problem from "almost all related to @Override annotation".

Andrzej Doyle
Oops. Here is the error:"method does not override or implement a method from a supertype"To give a specific example, the class heading is:[code]private class TakeSnapshotTask extends org.jdesktop.application.Task<Boolean, Void>[/code]and a method that has the above error message:[code]@Override protected Boolean doInBackground()[/code]And I will look for problems with respect to case. Thanks!
A: 

The platform/OS is irrelevant. The error strongly suggests that you are running the code in two different Java environments.

Double-check that you are not only compiling the code against a 1.6 JDK but also that you are executing it on a 1.6 JVM as well.

matt b
`@Override` does nothing at runtime - it's not even retained: http://java.sun.com/javase/6/docs/api/java/lang/Override.html
Adam Crume
What's the proper protocol to show that the problem is resolved? Of this writing the last comment above acknowledges so, but it's hard to see.
answer your own question to state how the solution was actually a missing JAR
matt b
A: 

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!