20000727: NoClassDefFoundError

>From: yetzer <yetzer@xxxxxxxxxxxxxxxxxxxxx>
>Organization: UCAR/Unidata
>Keywords: 200007271838.e6RIcNT26055


>when I try to run RubberBandBoxRendererJ3D I get the following:
>      Exception in thread "main" java.lang.NoClassDefFoundError:
>also when I try to run TestArea in data/mcidas I get the following error
>      Exception in thread "main" java.lang.NoClassDefFoundError:

This sounds like you installed the Java3D JDK with the Java 1.2 JDK
and are trying to run the JRE version of 'java' instead of the JDK.
Unlike the Java 1.2 distribution which can install both the JDK and
the JRE, Java 3D has the JDK and JRE packaged separately.  So, it could
be that the other day you were running the 'java' program which was
in the same directory in which you installed Java3D, and now you are
running the other one.  Look at your PATH to see which 'java' you
are running or if you are on Unix, type 'which java' to see what you

>I was actually able to run TestArea a few days ago, but I'm not sure why
>it won't run now.  Also when I ran this routine with a larger size file
>(a 14mb 4 km conus area image) I get the following error
>      Exception in thread "main" java.lang.OutOfMemoryError
>Can you shed some light on these NoClassDefFoundError problems and how
>can I overcome the memory problem.  Thank you.

You can increase the heap size with the -XmxNNNm flag to java.
For images much larger than 480 (lines) X 640 (elements), you should
use -Xmx64m or higher (I always use -Xmx128m).  You should also note
that there is a memory leak in the 1.1.X versions of Java 3D which
shows up if you load multiple images (like in the SpreadSheet).
Garbage collection doesn't get rid of the old textures.  This will
(hopefully) be fixed in Java 3D 1.2.1.  It's actually fixed in
1.2, but 1.2 has too many problems to make it useful with VisAD.

Don Murray
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
Unidata WWW Server               http://www.unidata.ucar.edu/
McIDAS Demonstration Machine  http://mcdemo.unidata.ucar.edu/