java 3D problems

I really want to learn java 3D and have got the sources and pdf things from killer game making site.

Im trying to do the simplest thing- actually run the hello universe demo that comes with the opengl java 3D sdk.

ive just downloaded a jre which i thought was the same as a sdk without the demos but i guess is not, so it has installed the dlls to the right place now, so i will try to run the demo;

Microsoft Windows XP [Version 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Ash>gojava

C:\Documents and Settings\Ash>cd C:\Sun3\AppServer\jdk\files

C:\Sun3\AppServer\jdk\Files>PATH= C:\Sun3\AppServer\jdk\bin ( my normal tools like javac )

C:\Sun3\AppServer\jdk\Files>set CLASSPATH=

C:\Sun3\AppServer\jdk\Files>cd C:\jdk1.4\demo\java3d\HelloUniverse (the location of the HelloUniverse class file)

C:\jdk1.4\demo\java3d\HelloUniverse>set CLASSPATH=C:\jdk1.4( the location of all my java 3D stuff, eg lib, bin , demo)

C:\jdk1.4\demo\java3d\HelloUniverse>java HelloUniverse
Exception in thread “main” java.lang.NoClassDefFoundError: HelloUniverse

C:\jdk1.4\demo\java3d\HelloUniverse>java HelloUniverse.class
Exception in thread “main” java.lang.NoClassDefFoundError: HelloUniverse/class

C:\jdk1.4\demo\java3d\HelloUniverse>set CLASSPATH= (thought i would try this)

C:\jdk1.4\demo\java3d\HelloUniverse>java HelloUniverse.class
Exception in thread “main” java.lang.NoClassDefFoundError: HelloUniverse/class

C:\jdk1.4\demo\java3d\HelloUniverse>java HelloUniverse
Exception in thread “main” java.lang.NoClassDefFoundError: javax/media/j3d/Node

C:\jdk1.4\demo\java3d\HelloUniverse>

obviosly its not looking in the right place for the class files but im not sure what to do.

Basically, from what I can recall, you would be best off putting your Java3D stuff into the same directory Java is installed in.

The bin directory from Java3D can go into the java bin directory, the lib stuff into the java lib directory and so on.

I seem to remember that any jar files you put into the $JAVA_HOME/jre/lib/ext/ directory should be automatically included in the classpath, but you need the DLL files to be in the java bin directory anyways.

Just want to say i know nothing ;D
especially dont know what $ JAVA_HOME means cos ive never seen that before.

Erm i found an ext file in my jre thing, not my main java thing in sun3 with my tools and stuff though.

Its in here C:\Program Files\Java\j2re1.4.2_11\lib
and has some executable jar files in it already so i think this is the right one.It does already have like vecmap in it though.

ive put all the classfiles in there so ill try run the thing again.

ok doesnt work yet , but i found in here : C:\Sun3\AppServer\imq\lib
another file called ext which says:

Sun Java System Message Queue
Version 3.7

Any .jar or .zip file placed in this directory ($IMQ_VARHOME/lib on Unix
and %IMQ_VARHOME%\lib on Windows) is added to the Broker’s CLASSPATH.
Typically this is only used when configuring JDBC support for the
Broker’s persistent store.

also in the read me it says : Java 3D™ consists of four jar files and three shared libraries.
You do not need to include the jar files in your CLASSPATH,
nor do you need to include the shared libraries in your PATH.
You should include “.” in your CLASSPATH or ensure that CLASSPATH
is not set.

thats like set CLASSPATH= , but mine still doesnt work when i do that its really weird.

I’m a bit confused by all this talk of what is where, but probably not as much so as you are.

$JAVA_HOME is just a shorthand way of saying the directory that your Java Runtime Environment or Java SDK is installed in.

The standard J3D download installs right over the jre directory. Im pertty sure there are instructions with it.

sorry about this :’( , always seems to happen to me , wish it would simply do what its supposed to , i need to take a programming course or something :slight_smile:
it will work eventually.

ive been following some instructions with it but im not clever enough to make it work , either that or my pc is cursed .

Yay !!! :smiley:
Fixed it !!!
Apologies for my stupidity.

erm i didnt see a folder in my normal sdk (C:\Sun3\AppServer\jdk\jre\lib)
probably becuase there are so many and i was looking in the wrong place , thanks for helping. :slight_smile: