There are some subtle differences between the official RHEL (Red Hat Enterprise Linux) and CentOS that can make life tough for a sysadmin.
One of these pesky differences is official Java support (Sun/Oracle vs OpenJDK). The OpenJDK bundled with CentOS is missing a plugin for Firefox, and the solution for RHEL is to install the Sun/Oracle java package(s) from the “Supplementary” package repository or install disc.
For those of us in the CentOS world, we can manually download the Java JRE or JDK from Oracle and follow their instructions for adding the plugin to Firefox. Please see the following Oracle document for plugin install details: “Manual Installation and Registration of Java Plugin for Linux.” I recommend using Java 6.x for best compatibility with the older packages included in CentOS 6.x.
Official Java downloads are available at http://www.oracle.com/technetwork/java/javase/downloads/
Example CentOS 64-bit install notes:
- Download jdk-6u37-linux-x64-rpm.bin or similar from Oracle, chmod +x the the file, then run with ./filename.bin
- cd /usr/lib64/mozilla/plugins
- ln -s /usr/java/jdk1.6.0_37/jre/lib/amd64/libnpjp2.so . # NOTE the *dot* at the end
- Test as recommended below 🙂
To verify the plugin install, visit “about:plugins” in Firefox to make sure Java is listed. If you see the correct Java plugin listed, visit some site requiring the Java plugin to complete your basic tests – a good page for this is http://www.java.com/en/download/testjava.jsp.
There is a problem with this method for CentOS, the process must be manually repeated for each new minor release (security or bug-fix) of Java. The Oracle/Sun Java package will not be automatically updated with the system, and neither will the symbolic link for the Firefox plugin. In RHEL, the package can get auto-updates from the “supplementary” repository channel, but I’m not sure if it integrates automatically with the “alternatives” system to keep the plugin linked to the latest release as well? Anyway, this is about CentOS and not RHEL – you need a paid entitlement with each RHEL system to access the update repositories for RHEL.