Tuesday, September 12, 2006

FC5 and jre

Was trying to get my java runtime environment working in FC5, thanks to this excellent guide, I managed to get it up really fast. http://www.mjmwired.net/resources/mjm-fedora-fc5.html#java

They have more resources than just on jre, so take a look at it. But in case they remove it anytime in the near future, I am pasting the guide to setting up jre:

1 March 2006

NOTE: Fedora Core 5 advises AGAINST using the Sun Java RPM.
Information can be found in the FC5 Release Notes on Java since the RPM may be
overwritten by a 'yum update' due to similar package names.

However if you do NOT use the FC5 Java packages, this should not affect you.

URL: http://java.sun.com/j2se/1.5.0/download.jsp

Choose the LATEST JRE Update, currently 6:

JRE 5.0 Update 6 includes the JVM technology
The J2SE Runtime Environment (JRE) allows end-users
to run Java applications. More info...
Download JRE 5.0 Update 6

Make sure to (*) Accept License Agreement


Linux Platform
Linux self-extracting file (jre-1_5_0_06-linux-i586.bin, 15.99 MB)

[root@charon fc5]# sh ./jre-1_5_0_06-linux-i586.bin
(type 'yes')
[root@charon fc5]# mv -f jre1.5* /opt/jre1.5
[root@charon fc5]# ln -s /opt/jre1.5/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

(If you update the JRE package, simply delete the /opt/jre1.5 directory and
copy the update to /opt/jre1.5 -- there will be no need to update the 'ln' link.)


Controlling Java through 'alternatives'. When running the 'java' command,
FC5 will automatically pick the GNU Java, to use Sun's java do the following:

[root@charon fc5]# /usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.5/bin/java 2
[root@charon fc5]# echo 2 | alternatives --config java

[root@charon fc5]# java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

NOTE for SELinux User

Users running SELinux may NOT be able to get their browser to detect
the plugins. Make the following changes to the SELinux policy:

Run: system-config-securitylevel
Goto: SELinux > Modify SELinux Policy > Compatibility >
Allow the use of shared libraries with Text Relocation
Allow executables to run with executable stack

No comments: