Click to See Complete Forum and Search --> : Exception in thread "main" java.lang.NoClassDefFoundError:


ctlmd
02-29-2004, 12:40 PM
That's the error I get every time I try to run an example java applet. I can compile and run a simple "Hello World!" program, but anything beyond that gives me that error. I had come to beieve it was my CLASSPATH, which is in .bashrc as export CLASSPATH=.:$CLASSPATH:/usr/java/j2sdk1.4.2_03:/usr/java/j2sdk1.4.2_03/jre/lib:/usr/java/j2sdk1.4.2_03/lib:/usr/java/j2sdk1.4.2_03;
but I've tried multiple combinations, none of which work. My JAVA_HOME is : export JAVA_HOME="/usr/java/j2sdk1.4.2_03". I've seen this problem all over the place and many potential solutions, none of which have worked for me. Does anybody see an obvious problem in what I'm doing?

bwkaz
02-29-2004, 04:33 PM
What class is it looking for?

ctlmd
02-29-2004, 04:59 PM
I realized that it's Whateverprogrogram.class that it's looking for, and these programs don't have main() routines because they're applets and must be run within other routines or in an appletviewer, although I haven't been able to get the latter to run either.