aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Cannot use Java 3D API with Eclipse?  Help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Cannot use Java 3D API with Eclipse?  Help!" Watch "Cannot use Java 3D API with Eclipse?  Help!" New topic
Author

Cannot use Java 3D API with Eclipse? Help!

Adam Wilkins
Greenhorn

Joined: Oct 19, 2005
Posts: 24
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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
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.


Ping & DNS - my free Android networking tools app
Adam Wilkins
Greenhorn

Joined: Oct 19, 2005
Posts: 24
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)
Adam Wilkins
Greenhorn

Joined: Oct 19, 2005
Posts: 24
FYI...I am asking the same question in the IDE forum - found it after I posted this one....
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
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.
Adam Wilkins
Greenhorn

Joined: Oct 19, 2005
Posts: 24
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!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot use Java 3D API with Eclipse? Help!