aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Java 3D Classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java 3D Classpath" Watch "Java 3D Classpath" New topic
Author

Java 3D Classpath

Patrick Tibbetts
Greenhorn

Joined: Jan 06, 2002
Posts: 20
I know this is going to be a dumb question.
I downloaded Java 3D 1.2.2, OpenGL and the JRE onto my NT machine.
It said clearly that I did not have to change the classpath for this and that it be done automatically.
This was not done.
I am getting errors like "Exception in thread..."
and Classpath not found.
I can not find one thing on the API or Sun site about this. It says read the Read Me text file, which was no help.
All opinions are very welcomed and I thank you!
-patrick
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
I would check to make sure that the files containing the classes you want are on the classpath, no matter what the documentation may say.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Patrick Tibbetts
Greenhorn

Joined: Jan 06, 2002
Posts: 20
You mean place the .jar and the .dll files the classpath?
I will try that.
Thanks!
Patrick Tibbetts
Greenhorn

Joined: Jan 06, 2002
Posts: 20
I have done all this on my NT machine:
I have set classpath, made sure the .jar and .dll files were in the correct places, I have installed and re-installed, I have been to the Sun forums where a dozen other programmers are working this, I have also been to other forums regarding this, I have even written Sun (no reply on this yet), Tried JBuilder 5, and I also tried setting a path directly the file...nothing...
How is anyone that is working on Java 3D getting this to work at all???
It must work....right?
I would entertain any suggestion at this point.
feel free to mail me directly.....
Thank you all in advance!!!
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Could you show the exact error that you are getting?
Patrick Tibbetts
Greenhorn

Joined: Jan 06, 2002
Posts: 20
Yes, this is the error when I pull up 'java HelloUniverse'
Exception in thread "main" java.lang.NoClassDefFoundError: HelloUniverse

I followed the install instructions to the wire and then I found that others had the same problem. I went to the Sun Forum where others have tried solutions, but no luck on my end...
I know what that error is, but none of my solutions or others have worked out.
Thanks!
Unnsse Khan
Ranch Hand

Joined: Nov 12, 2001
Posts: 511
Patrick,
I had the same problem, last night with the Java 3D API. However, I fixed the problem...
Uninstall your Java 3D API from start/control panel/add-remove programs
Uninstall your JRE and JDK in the same fashion...
In these steps:
1. Re-install your JDK.
2. Re-install your JRE.
3. Set CLASSPATH user environment variable in System/Properties to:
CLASSPATH = .;c:jdk1.3.1_02\jre\lib\rt.jar;jdk1.3.1_02\lib\tools.jar;%CLASSPATH%
4. Make a JAVA_HOME user environment variable and set it to:
JAVA_HOME = .;c:\jdk1.3.1_02;%JAVA_HOME%
5. Install the Java 3D API.
Now, while the Java 3D API installer is running, its going to ask you which JVMs to add the JAR files to, (it should have located and displayed the path to the JDK and the path to the JRE), select both, and hit "FINISH" or "NEXT".
6. Insert the c:\jdk1.3.1_02\bin to the PATH user environment variable...
7. Restart your computer....
9. Click on the "Basic" tab in your Java Plug-in's settings in control panel and type mx64m in the empty Java Runtime Parameters box.
10. Click on the "Advanced" tab and choose Java Plug-in Default.
11. Boot Netscape or Internet Explorer and open the index file in the c:\jdk1.3.1_02\demo\java3d\index.html directory.
If you can see the applets in boot, you'll know you did it correctly...
Good luck,
Unnsse M. Khan
Patrick Tibbetts
Greenhorn

Joined: Jan 06, 2002
Posts: 20
Thank you very much!!!
IT WORKS!
Viet Le Anh
Greenhorn

Joined: Nov 18, 2008
Posts: 1
hello eveybody
I come from VietNam
I started learning Java 3d.I have been creating project Hello3d but i have met same proplem.
I am getting errors in Eclipse:
"Nov 19, 2008 1:38:17 PM javax.media.j3d.NativePipeline getSupportedOglVendor
SEVERE: java.lang.UnsatisfiedLinkError: no j3dcore-ogl-chk in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: no j3dcore-d3d in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at javax.media.j3d.NativePipeline$1.run(NativePipeline.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.j3d.NativePipeline.loadLibrary(NativePipeline.java:180)
at javax.media.j3d.NativePipeline.loadLibraries(NativePipeline.java:137)
at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:948)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:280)
at Hello3d.<init>(Hello3d.java:9)
at Hello3d.main(Hello3d.java:33)
"


Viet Le Anh
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19722
    
  20

Please Don't Wake The Zombies. This has got to be one of the biggest kicks I've ever seen - nearly 7 years!

On topic, you are missing one of the native libraries in your java.library.path. Check out the install instructions.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Stuart Page
Greenhorn

Joined: Feb 14, 2009
Posts: 1

For some reason I can get the Java3d tutorial to work only if i put all the necessary packages in the same folder as my code, and specify EACH package in the classpath as such below:

java -classpath .;\.;j3dcore.jar;j3dutils.jar;rt.jar;tools.jar;vecmath.jar;j3dcore-d3d.dll;j3dcore-ogl-cg.dll;j3dcore-ogl-chk.dll;j3dcore-ogl.dll HelloJava3Da

Why the heck does it not just work due to the fact that i have .;\. in the classpath? This should automatically check all the files in the current folder shouldnt it? Ive tried with just those two and it doesnt work. I have to individually specify each package, which is annoying to say the least.

Stu
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
Stuart Page wrote:For some reason I can get the Java3d tutorial to work only if i put all the necessary packages in the same folder as my code

That's definitely not necessary. The jar files and the native libraries can reside elsewhere provided they are properly referenced.

Why the heck does it not just work due to the fact that i have .;\. in the classpath? This should automatically check all the files in the current folder shouldnt it?

No. Java doesn't work that way; that has nothing to do with Java3D in particular. Jar files need to be part of the classpath explicitly - including just the directory they're in won't work.


Ping & DNS - my free Android networking tools app
Anna White
Greenhorn

Joined: Feb 19, 2009
Posts: 2
Hey

I've just downloaded Java 3D 1.5.1 and set the CLASSPATH to include the j3dcore/j3dutils and vecmath.jars
I was reading the above and downloaded the API (1.5.2); Do i have to save it anywhere in particular and do i have to include a reference to it in the CLASSPATH?

Anna White
Greenhorn

Joined: Feb 19, 2009
Posts: 2
OK worked out why my little SimpleTest.java program wont work!

I have the api saved like Java\Java3D\j3d-1_5_2-api-docs
i need to access the com.sun.j3d.util.gemoetry for the SimpleTest.java to work (i import the gemoetry, universe and image.TextureLoader)
how do i reference that or do i need to save the api docs somewhere specific?

sorry i thought a more directed question would help :p

Dávid Kéri
Greenhorn

Joined: Oct 15, 2009
Posts: 12
Hey all!

I have a problem while trying to load an OBJ file in Java3D.

I got all imports, but the on the following one:

import javax.vecmath.Point3D;

eclipse says cannot be resolved,although vechmath.jar is in the JRE system library.
I checked the Point3D class in the javax.vecmath package, and upon double clicking on it, Eclipse says "source not found, the source attachment does not contain the source for the file Point3d.class. "

I have followed Uhnnse Khan's directions which I quote here:

Unnsse Khan wrote:Patrick,
I had the same problem, last night with the Java 3D API. However, I fixed the problem...
Uninstall your Java 3D API from start/control panel/add-remove programs
Uninstall your JRE and JDK in the same fashion...
In these steps:
1. Re-install your JDK.
2. Re-install your JRE.
3. Set CLASSPATH user environment variable in System/Properties to:
CLASSPATH = .;c:jdk1.3.1_02\jre\lib\rt.jar;jdk1.3.1_02\lib\tools.jar;%CLASSPATH%
4. Make a JAVA_HOME user environment variable and set it to:
JAVA_HOME = .;c:\jdk1.3.1_02;%JAVA_HOME%
5. Install the Java 3D API.
Now, while the Java 3D API installer is running, its going to ask you which JVMs to add the JAR files to, (it should have located and displayed the path to the JDK and the path to the JRE), select both, and hit "FINISH" or "NEXT".
6. Insert the c:\jdk1.3.1_02\bin to the PATH user environment variable...
7. Restart your computer....
9. Click on the "Basic" tab in your Java Plug-in's settings in control panel and type mx64m in the empty Java Runtime Parameters box.
10. Click on the "Advanced" tab and choose Java Plug-in Default.
11. Boot Netscape or Internet Explorer and open the index file in the c:\jdk1.3.1_02\demo\java3d\index.html directory.
If you can see the applets in boot, you'll know you did it correctly...
Good luck,
Unnsse M. Khan


Although point number 9 was unclear, but I don't think that would have a great effect on my problem, so skipped.
Still no use, problem is still there.

I attack a screenshot of my eclipse workspace so you can see the whole thing:



I hope someone can help me out.
Thanks.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java 3D Classpath