User Tools

Site Tools


aoe:java

64 bit Linux and Java

The java Plug-in, dk1.6.0_17, for Firefox on Scientific Linux 5.4 x86_64 did not work, at least for me. Nor would Visual Doc work reliably. By this I mean after I wrestled with it for a few days, I could not find the combination to make it work like I did on previous installs. On previous installations, I would install the openjdk and it seemed to start working.

However, the latest, jdk-6u19-linux-x64.bin, from Oracle would work for both.

Download jdk-6u19-linux-x64.bin from sun and install in /root/java or /aoe/visualdoc/java.

copy to the directory that it is to be installed.

chmod +x jdk-6u19-linux-x64.bin
./jdk-6u19-linux-x64.bin

For the browser plug-in:

# mkdir java
# cd ~/java
# cd /usr/lib64/mozilla/plugins
# ln -s /root/java/jdk1.6.0_19/jre/lib/amd64/libnpjp2.so .

Now, as root at least, the plug-in works. A global solution might be to use the RPM installer, but I'd prefer to wait for the distribution to fix it (which, BTW, updated the day after trying to figure this out!). Putting the bin in a more logical global directory might work too, but I did not want to clobber the distribution . For instance, the distribution puts the plug-in here:

/usr/java/jdk1.6.0_17/jre/lib/amd64/libnpjp2.so

so, /usr/java might be a good place to put it.

To test the Browser Plug-in with the demo applets, run Firefox locally and go to this address:

file:///usr/java/default/demo/applets.html

or

file:///usr/java/jdk1.6.0_19-local/demo/applets.html

To work around VisualDoc not being able to find Java, add the over ride-able variable either as export:

/aoe/bin/visualdoc

#!/bin/bash
export VJAVA=/aoe/visualdoc/java/jdk1.6.0_19/bin/java
/aoe/visualdoc/vrand/bin/visualdoc $@

or inline like this:

/aoe/bin/visualdoc

#!/bin/bash
VJAVA=/aoe/visualdoc/java/jdk1.6.0_19/bin/java /aoe/visualdoc/vrand/bin/visualdoc

To harness the system version of java, alternatives seems to be the key:

/usr/sbin/alternatives --config java
/usr/sbin/alternatives --config javac
/usr/sbin/alternatives --config java_sdk_1.6.0

The next day, the distribution updated sun java to jdk-1.6.0_19-fcs.x86_64 and java-1.6.0-sun-compat-1.6.0.19-1.sl5.jpp.x86_64 and the browser plugin seemed to work.

When trying to start VisualDoc using java pointed to by /usr/java/default/bin/java the following error is thrown:

Could not load the following shared library, or one of its dependencies: guidb

This was caused by troubleshooting earlier on montgolfier and changing the link /usr/bin/java to /usr/java/default/bin/java instead of /etc/alternatives/java. It should be:

ln -s /etc/alternatives/java /usr/bin/java

When openjdk is installed. It also works with the downloaded java in

/aoe/visualdoc/java/bin/java
aoe/java.txt · Last modified: 1970/01/18 07:09 by 127.0.0.1