Problems with Java3D Lib Configuration

Installing Java3D on Eclipse

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).

Get eclipse (java) to work with java3d

Interestingly, it works if I compile and run the application from my terminal:

javac -classpath /usr/share/java/j3dcore.jar:/usr/share/java/j3dutils.jar:/usr/share/java/vecmath-1.5.2.jar:. HelloWorld.java
java -classpath /usr/share/java/j3dcore.jar:/usr/share/java/j3dutils.jar:/usr/share/java/vecmath-1.5.2.jar:. HelloWorld

But I would really like to use eclipse to do this kind of things.

$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.04.1)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

It also works with Eclipse, if I copy the native library (libj3dcore-ogl.so) to the jvm directory and add the libraries (j3dcore.jar, j3dutils.jar, vecmath-1.5.2.jar) as external jars to the build path libraries (right click on project -> Properties -> Java Build Path -> Libraries -> Add External JARs...):

sudo cp /usr/lib/jni/libj3dcore-ogl.so /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/

But I wonder if there really is no solution that wouldn't require this copy.

Cannot use installed java 3d

You use an obsolete version (1.5.2) of Java3D, this version is no longer maintained since a few years. Please uninstall it and install the latest version (1.6.0). Follow my instructions here.



Related Topics



Leave a reply



Submit