Saturday, December 30, 2006

Installing Java for Firefox and Mozilla

From what I've seen on the Linux forums there are a few different schools of thought when it comes to installing Java. Here's what I do. I download Java from www.java.com/en/download/linux_manual.jsp. Download the Linux (self-extracting file). This will save the file to your default download location. I move the downloaded file from /home/glenn/Desktop (my default download location) to /opt.

[root@dad ~]# mv /home/glenn/Desktop/jre-1_5_0_09-linux-i586.bin /opt

Next I change to the /opt folder.
[root@dad ~]# cd /opt

Then I run the downloaded file.
[root@dad ~]# sh jre-1_5_0_09-linux-i586.bin

Press the space bar several times to accept the defaults and finally type 'yes'. When the installation is done you need to link the Java plug in to the Firefox and Mozilla plug in folders so that Java will work properly.

Link to Firefox plug in.
[root@dad opt]# ln -s /opt/jre1.5.0_09/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/firefox-1.5.0.8/plugins/

Link to Mozilla plug in.
[root@dad opt]# ln -s /opt/jre1.5.0_09/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/

Installation is complete. You can remove jre-1_5_0_09-linux-i586.bin if you desire.

Close Firefox if it is open. Start Firefox. I usually go to Google and search 'test java'. I select a web page that will in fact use the plugin to confirm that it works, which it will. This method works every time I install Java on a new system.

No comments: