Java plugin on SL 6

Just a bit of info on how to use alternatives to switch from IcedTea to the Oracle Java plugin for Firefox on Red Hat or a RHEL clone like Scientific Linux.


Somewhere in the world a Mac gets infected and results in all hell breaking loose amongst the security community, although no one should believe any nonsense about it being a surprise. It wasn’t. Uncharacteristically I will blame the real culprits here: stupid or lazy users, and a few stupid and lazy ones (Oracle’s critical patch notes are here, and here are Red Hat’s openjdk patch release notes).

But I digress.

This is more of a quick note for those whose security protocols require moving up to Java Standard Edition 1.6.0_31 for everything. Example given is for Scientific Linux 6.2 on x86_64 (keep in mind that with the patch noted above, openjdk on RHEL and its clones is safe).

My JDK 1.6.0_31 is installed at /usr/java/jdk1.6.0_31 and symlinked to “latest”, which itself is symlinked to “default”.

The system java has also been reset to the Oracle version via alternatives, rather than the shipping openjdk. See this about that.

[[root@test1 alternatives]# alternatives --install 
/usr/lib64/mozilla/plugins/libjavaplugin.so 
libjavaplugin.so.x86_64 
/usr/java/default/jre/lib/amd64/libnpjp2.so 310
[root@europa alternatives]# alternatives --config 
libjavaplugin.so.x86_64

There are 2 programs which provide 'libjavaplugin.so.x86_64'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/lib/amd64/IcedTeaPlugin.so
   2           /usr/java/default/jre/lib/amd64/libnpjp2.so

Enter to keep the current selection[+], or type selection number: 2
[root@test1 alternatives]#