Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Java3D on Eclipse

I'm trying to use Java3D in my project. This is the error I receive:

29-Dec-2010 1:01:29 AM 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(Unknown Source)
 at java.lang.Runtime.loadLibrary0(Unknown Source)
 at java.lang.System.loadLibrary(Unknown Source)
 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 World.<init>(World.java:10)
 at Start.main(Start.java:12)

I have copied the .jar files into my project's lib folder and linked them in Project -> Properties -> Add Jar File. There was also a .dll file in the Java3D download that I haven't touched or included in any way. What am I missing?

like image 524
Matt Avatar asked Nov 27 '25 00:11

Matt


2 Answers

On Windows you must add the directory containing the DLL‘s (e.g. …\j3d-1_5_2-windows-i586\bin) to the PATH environment variable. The “Unzip Instructions” incorrectly says that the nonexistent “…\lib\i386” should be added (version 1.5.2).

Not able to test it on Linux, but probably you must add the directory with the SO files to the LD_LIBRARY_PATH environment variable.

More details in the README-unzip.html file in j3d-1_5_2-windows-i586.zip or j3d-1_5_2-linux-i586.zip (same for other systems).

like image 85
user85421 Avatar answered Nov 29 '25 14:11

user85421


For me, the answer was "project/properties/java build path/source tab/expand and select native library location / navigate to i386 folder." by telman shahbazov (problems with java3D lib configuration). Thought I'd put this here for anyone else googling with this problem.

like image 31
Adam K Dean Avatar answered Nov 29 '25 14:11

Adam K Dean



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!