Java Plugin for CentOS 6

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.

Advertisements

About notesbytom

Keeping technology notes on WordPress.com to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in Linux and tagged , . Bookmark the permalink.

2 Responses to Java Plugin for CentOS 6

  1. VL says:

    Thanks ! I am trying to get java web start to work and it is not launching correctly. Any suggestions?

    • notesbytom says:

      Sorry, not sure about the Java Web Start. If all else fails there’s always Java Web Start fully supported on Windows/Internet Explorer. I’m always going back to Windows for things like that.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s