• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java 3D Classpath

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Patrick Tibbetts
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean place the .jar and the .dll files the classpath?
I will try that.
Thanks!
 
Patrick Tibbetts
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you show the exact error that you are getting?
 
Patrick Tibbetts
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much!!!
IT WORKS!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
"
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic