Nevyn
October 10th, 2008, 02:10 AM
Hello!
Today I was studying (in eclipse) for my beginners Java programming exam, when I accidentally messed up the view (closed the "run"-window). After I had restored the windows to it's original layout, I suddenly couldnt run any programs I'd previously written that used to work perfectly. I can't think of anything I've done to cause it (even though I obviously have).
No compilation error, but run error
Exception in thread "main" java.lang.NoClassDefFoundError: AdditionTable, where AdditionTable is the program I'm trying to run.
I've been googling for a few hours and seen many with the same error code and they all seem to have gotten the same diagnosis; wrong CLASSPATH. After several hours of researching I still haven't been able to find a solution that I understant enough to be able to do. The eclipse documentation also gave me nothing.
Anybody got an idea where I change this CLASSPATH, and more importantly: what should I change it to?
Using Java 1.5, I have made damn sure I have no other Java version installed.
Typing "dpkg -l | grep libswt" in the console gave me this:
ii libswt3.2-gtk-gcj 3.2.2-5ubuntu2 Fast and rich GUI toolkit for Java, gtk2 (GC
ii libswt3.2-gtk-java 3.2.2-5ubuntu2 Fast and rich GUI toolkit for Java, gtk2 ver
ii libswt3.2-gtk-jni 3.2.2-5ubuntu2 Platform dependent files for libswt3.2-gtk-j
And typing "java -version" gives me:
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)
Would very much appreciate any help given, since the exam date is closing in fast.
Today I was studying (in eclipse) for my beginners Java programming exam, when I accidentally messed up the view (closed the "run"-window). After I had restored the windows to it's original layout, I suddenly couldnt run any programs I'd previously written that used to work perfectly. I can't think of anything I've done to cause it (even though I obviously have).
No compilation error, but run error
Exception in thread "main" java.lang.NoClassDefFoundError: AdditionTable, where AdditionTable is the program I'm trying to run.
I've been googling for a few hours and seen many with the same error code and they all seem to have gotten the same diagnosis; wrong CLASSPATH. After several hours of researching I still haven't been able to find a solution that I understant enough to be able to do. The eclipse documentation also gave me nothing.
Anybody got an idea where I change this CLASSPATH, and more importantly: what should I change it to?
Using Java 1.5, I have made damn sure I have no other Java version installed.
Typing "dpkg -l | grep libswt" in the console gave me this:
ii libswt3.2-gtk-gcj 3.2.2-5ubuntu2 Fast and rich GUI toolkit for Java, gtk2 (GC
ii libswt3.2-gtk-java 3.2.2-5ubuntu2 Fast and rich GUI toolkit for Java, gtk2 ver
ii libswt3.2-gtk-jni 3.2.2-5ubuntu2 Platform dependent files for libswt3.2-gtk-j
And typing "java -version" gives me:
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)
Would very much appreciate any help given, since the exam date is closing in fast.