Forums Register Login

Cannot use Java 3D API with Eclipse? Help!

+Pie Number of slices to send: Send
I have both Eclipse and JCreator. JCreator works fine with Java 3D, but Eclipse is having issues. I believe the main error to be:


The import com.sun.j3d cannot be resolved

Any idea on how to fix this? It makes no sense (to me) why JCreator works and Eclipse is not.

Thanks in advance,
Adam
+Pie Number of slices to send: Send
Most likely Eclipse expects the jar files it uses in different location than JCreator. Look for classpath settings in the Eclipse GUI, and see if those include the Java3D libraries.
+Pie Number of slices to send: Send
OK, I have done this, but now I am getting the following error during execution. Eclipse sees no errors in the code now...

Exception in thread "main" java.lang.UnsatisfiedLinkError: no j3dutils in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.sun.j3d.utils.timer.J3DTimer$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.j3d.utils.timer.J3DTimer.<clinit>(Unknown Source)
at SwingTimerTest.<init>(SwingTimerTest.java:85)
at SwingTimerTest.main(SwingTimerTest.java:194)
+Pie Number of slices to send: Send
FYI...I am asking the same question in the IDE forum - found it after I posted this one....
+Pie Number of slices to send: Send
Java3D consists of a couple of native libraries, as well as the jar files. Those native libraries -which are missing in your case- need to be in the path indicated by the system property "java.library.path". Take a look at what that looks like on your machine, and put the DLLs (or whatever format you have) in one of the directories mentioned in it.
+Pie Number of slices to send: Send
I think that did it. I wasn't too sure what I was doing, but I added a new classpath variable pointing to the appropriate directory that had the Java 3D .dll files in there.

Thanks!!!
Everybody's invited. Except this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 6076 times.
Similar Threads
an error "cannot resolve symbol"
Java IDE
java program automatically chooses the default in switch on the next loop
won't let me input integer values
Eclipse and Java 3D problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:24:51.