Today a thread got my attention. We now can have not only the Adobe 64-Bit Flash plugin but also the Suns Java 64-Bit plugin. Of couse, IcedTea in OpenJDK has done a great job, but someone may still want the Suns.

1   Installing

First is to download JRE1 (or JDK, but you have to change the paths). The version I downloaded is Linux x64 RPM in self-extracting JRE file Build b03.

su -
sh jre-6u12-ea-bin-b03-linux-amd64-22_dec_2008-rpm.bin

Then you need to create two alternative profiles, one for running normal Java application, the other for plugin.

alternatives --install /usr/bin/java java /usr/java/jre1.6.0_12/bin/java 0
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jre1.6.0_12/lib/amd64/libnpjp2.so 0

Warning

The path may be different, please double check!

After creating two profiles, you need to choose to use them.

alternatives --config java
alternatives --config libjavaplugin.so.x86_64

You should select the ones at the bottom of each list. alternative gives you flexibility if you need to frequently switch between OpenJDK or Sun JDK/JRE. You just run the commend above to choose.

2   Testing

  • Open about:plugins, you should see libnpjp2.so. No IcedTea plugin shows up since we use alternative.
  • Go to this Suns page, you should see a dancing duke is dancing for you.

3   Removing?

su -
alternatives --remove java /usr/java/jre1.6.0_12/bin/java
alternatives --remove libjavaplugin.so.x86_64 /usr/java/jre1.6.0_12/lib/amd64/libnpjp2.so
alternatives --auto java
alternatives --auto libjavaplugin.so.x86_64
yum remove jre

Warning

Again: The path may be different, please double check!


[1]http://download.java.net/jdk6/binaries/ is gone.