I would really like to use the java-1.6.0-sun packages from Red Hat, but alternatvies system makes it really difficult to use things like Java 3D. Every update of Java installs in a new directory, and symlinks are used to hide that fact. There are in fact 3 links to get to the java binary.
/usr/bin/java -> /etc/alternatives/java
/etc/alternatives/java -> /usr/lib/jvm/jre-1.6.0-sun.x86_64/bin/java
/usr/lib/jvm/jre-1.6.0-sun.x86_64 -> java-1.6.0-sun-220.127.116.11.x86_64/jre
The destination of the final symlink is the physical directory, which changes with every update.
Here is the problem: Java 3D is used extensively here, and it needs to be installed in JRE's lib/ subdirectory. There are 4 files (for 64-bit):
$path to JRE/lib/amd64/libj3dcore-ogl.so
$path to JRE/lib/ext/vecmath.jar
$path to JRE/lib/ext/j3dcore.jar
$path to JRE/lib/ext/j3dutils.jar
Actually, you can put libj3dcore-ogl.so in /usr/lib64 without any problem, but the 3 jar files are a real issue. Even setting the CLASSPATH does not really work in the general case because lots of java programs set the classpath explicitly at launch, or the wrapper scripts clobber the CLASSPATH variable. And nothing seems to work for web start other than putting the directory
So here is the real question: I want to create a RPM for java3d and install on the desktops. Java3D rarely changes (years between updates). I really don't want to repackage it every time RH releases a new java-1.6.0-sun package, but if I am to put it in the JRE's /lib subdir, it seems like I'm stuck doing that (there is no way to use symlinks to moving when RH keeps moving the dir). Is there are workaround? Thanks!