Thursday 1 March 2012

Install Java J2RE and Mozilla Plug-in

It's also very handy to have the Java run-time environment available and most importantly a Mozilla plug-in so you can view dynamic content. It's unfortunate that Mozilla will actually crash if you go to a site containing Java and you don't have the plug-in installed. The libraries in Fedora 7 are newer than the ones used by Sun's build so you'll also need to install a compatability library.
Java Runtime Environment (JRE) 6 Update 2 (at the time I wrote this) from Java.com. You'll want to grab the Linux RPM in self-extracting file. Then you want to install it with:
# yum -y install compat-libstdc++-33
# sh ./jre-6u2-linux-i586-rpm.bin
Then you'll probably want to enable Java Plug-ins and here once again there is no easy way:
# ln -s /usr/java/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins
And finally you'll need to tell Fedora that you wish to use this version of Java as the preferred interpreter rather than the Open Source version that's installed by default. You'll of course need to adjust the full pathname if you install a newer version of the jre than the one in this example:
# /usr/sbin/alternatives --install /usr/bin/java java \
 /usr/java/jre1.6.0_02/bin/java 1602
# /usr/sbin/alternatives --config java
There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
 + 1           /usr/lib/jvm/jre-1.5.0-gcj/bin/java
*  2           /usr/java/jre1.6.0_02/bin/java

Enter to keep the current selection[+], or type selection number: 2
# java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode, sharing)
If you know of an easier way please post it to the Comments section below.
After you re-start your browser you can test the Java plug-in installation at http://java.com/en/download/installed.jsp

No comments:

Post a Comment