This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 41128
    
  45
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: 41128
    
  45
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!!!
 
Don't get me started about those stupid light bulbs.
 
subject: Cannot use Java 3D API with Eclipse? Help!
 
Similar Threads
Eclipse and Java 3D problem
java program automatically chooses the default in switch on the next loop
Java IDE
won't let me input integer values
an error "cannot resolve symbol"