Installing Sun Java 64 bit Browser Plugin
This howto will show you how to painlessly install the Sun Java broswer plugin. You should be aware of several potential risks before you start. 1. Centos uses gcj which is a free version of Java, but it is not Java. There are potential mix-match problems that can arise when compiling some applictions on development machines. 2. If your system is slow you may run into problems as Sun Java tends to be CPU and RAM intensive. 3. If you’re running an x86_64 system and compiling 32bit applications without the proper chrooted environment it will most likely not work. The main purpose for this howto is only for a 64 bit browser solution. If you need more in-depth instructions please see the howto here by Scott Glaser or the IcedTea howto by jmahowald on fedorasolved.org. That said let’s get started.
Applicable to Centos Versions:
- Centos 5.x
- Download the Sun Java 64 bit RPM file here: http://www.java.com/en/download/manual.jsp
- Download this file: Linux RPM .bin (self-extracting file)
Doing the Work
Basic description of what will be done and what is expected.
- Once the file has been downloaded, navigate to the directory in the terminal as root and run the following command:
- Once the RPM is installed run this command as root and any user on the system should be able to take advantage of Sun Java in Firefox:
- Next close and restart Firefox:
chmod +x jre-6u12-linux-x64-rpm.bin; ./jre-6u12-linux-x64-rpm.bin
ln -s /usr/java/jre1.6.0_12/lib/amd64/libnpjp2.so /usr/lib64/firefox-3.0.6/plugins/libnpjp2.so
note: if the directory /usr/lib64/firefox-3.0.6/plugins/ does not exist, first create it with this
command as root: mkdir /usr/lib64/firefox-3.0.6/plugins/
simply close it via GUI or run this in the terminal: killall firefox-bin
How to test
- Is the RPM installed?:
- Make sure you’ve linked the library correctly:
rpm -qa | grep -i jre
ls -als /usr/lib64/firefox-3.0.6/plugins
8 drwxr-xr-x 2 root root 4096 Mar 9 15:00 .
8 drwxr-xr-x 10 root root 4096 Mar 9 14:59 ..
4 lrwxrwxrwx 1 root root 43 Mar 9 15:00 libnpjp2.so -> /usr/java/jre1.6.0_12/lib/amd64/libnpjp2.so
the "l" at the beginning of this permissions list indicates that the symbolic link has been created and
the -> shows where it leads.
We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net