java3d ebuild for gentoo

The java3d ebuilds in the gentoo portage tree are very outdated, and didn’t even work for me anymore. So I wanted to install a newer version of java3d. This resulted in the updated ebuild you can download from here:

[download#22]

I tried the ebuild together with sun-jdk-1.6.0.13 on x86_64 gentoo linux, but it schould also work on i586.

To use it just create the directory structure

mkdir -p /usr/local/portage/dev-java/sun-java3d-bin/

and copy the new ebuild to that directory. Then run

ebuild /usr/local/portage/dev-java/sun-java3d-bin/sun-java3d-bin-1.5.2.ebuild digest

Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then just emerge sun-java3d.

emerge /usr/local/portage/dev-java/sun-java3d-bin/sun-java3d-bin-1.5.2.ebuild

The ebuild creates some symlinks in your VM’s directory, so if you switch the browser plugin or the entire VM you have to reemerge sun-java3d-bin. To have the library ready to use you also have to add the following lines to your /etc/profile:

if [ “$CLASSPATH” = “” ] ; then
CLASSPATH=”/usr/share/sun-java3d-bin/lib/vecmath.jar:/usr/share/sun-java3d-bin/lib/j3dutils.jar:/usr/share/sun-java3d-bin/lib/j3dcore.jar”
else
CLASSPATH=”${CLASSPATH}:/usr/share/sun-java3d-bin/lib/vecmath.jar:/usr/share/sun-java3d-bin/lib/j3dutils.jar:/usr/share/sun-java3d-bin/lib/j3dcore.jar”
fi
export CLASSPATH

if [ “$LD_LIBRARY_PATH” = “” ] ; then
LD_LIBRARY_PATH=”/usr/lib/sun-java3d-bin/”
else
LD_LIBRARY_PATH=”${LD_LIBRARY_PATH}:/usr/lib/sun-java3d-bin/”
fi
export LD_LIBRARY_PATH

To have the changes in effect logout and login again.

If you want to have java3d useable in firefox you have to modify the line:

export LD_LIBRARY_PATH=”/usr/lib64/mozilla-firefox”

in your /usr/bin/firefox to:

export LD_LIBRARY_PATH=”/usr/lib64/mozilla-firefox”:$LD_LIBRARY_PATH

Otherwise you will end up getting unstatisfied link errors since the j3d library cannot be loaded.

Finally you can test if your java3d works on Testseite für Java und Java3D – VS-C. If you are working in a multiheaded environment, this java3d version may only work on the first display. So, if you experience problems just place your browser on the first head.

Have Fun

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

siteinfo

Translator