Install the Java Plugin for 64bit Firefox on CentOS 6.4
Posted on May 3, 2013 (last modified May 8, 2021)
Today, I had to install the Java plugin for 64bit Firefox on CentOS 6.4. The procedure wasn’t too bad, but it wasn’t exactly straight-forward either. So, I’m recording what worked for when I have to do it again. Hopefully, you might find it useful too. This is not a descriptive tutorial; it’s just quick notes, so you may have to do a little reading between the lines.
Java must be installed on the system first. This procedure only works with the version you download from Oracle; it will not work with the OpenJDK version of Java you’ll have when using the ‘yum install java’ command.
Download Linux x64 RPM from Oracle's Java Downloads for All Operating Systems page.
Close Firefox.
Change to root user and enter password.
suChange directory to /usr/java. If it isn’t created, create it.
mkdir /usr/java
cd /usr/javaExecute rpm on the Java RPM you just downloaded…
rpm -ivh /home/basejump/Downloads/jre-7u21-linux-x64.rpmValidate with:
java -versionDelete the original RPM; you don’t need that anymore.
rm -rf /home/basejump/Downloads/jre-7u21-linux-x64.rpmFrom the /usr/java directory, Find the Firefox plugin (which gets installed with java):
find . | grep libnpjpFor me, that returned:
/usr/java/jre1.7.0_21/lib/amd64/libnpjp2.soChange to directory for Firefox plugins:
cd /usr/lib64/mozilla/pluginsBe careful. There is also a /usr/lib/mozilla/plugins directory. Be sure you’re in lib64!
Create symbolic link to the plugin:
ln -fs /usr/java/jre1.7.0_21/lib/amd64/libnpjp2.so libnpjp2.soExit the root user:
exitStart Firefox and validate by going to Tools > Addons > Plugins. You should now see Java Plug-in 1.x.x enabled.