If you use Fedora 8 or If you do not use yum or do not have any Fedora/GNU java installed this will not affect you. If you are using yum and installed the RPM it is recommended to remove it, to remove the Java version that comes from Fedora 8 distro, simply
# yum remove java-*-icedtea java-*-icedtea-devel java-*-icedtea-plugin
or
# rpm -q jre
# rpm -e jre
SUN JAVA INSTALLATION on FEDORA
Here are the simple steps on how to install Sun Java on Fedora 8 and make it work.
1. Download Sun Java's self-extracting file (roughly 18MB) from http://www.java.com/en/download/linux_manual.jsp
Edited:
This type of Sun Java installation would proceed to rpm-based mode of installation. Make sure you choose the RPM self-extracting file from the site.
2. Launch your terminal. Install the following library modules needed by Sun Java.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# yum -y install compat-libstdc++-33 compat-libstdc++-296
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EDITED: FOR RPM-BASED INSTALLATION
(thanks to Hilel for noticing a mixed non-rpm and rpm based installation instructions)
3. Now, go to your downloaded self-extracting file and issue the following commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# cd ~Desktop
# chmod 755 jre-6u3-linux-i586.bin
# ./jre-6u3-linux-i586.bin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this will create a new folder on your desktop, named jre1.6.0_03 or something like that. than, as root, do:
mv jre1.6.0_03 /usr/java
(you might need to create /usr/java first).
The package then shows license and agreement terms where in you need to accept before you can proceed with the installation process. You can hit spacebar to scroll down. To jump direct to the bottom part of the agreement page, simply press 'q' and type yes to finally accept the license terms.
The above will then install the rpm package into your F8 box.
4. After successful rpm installation, simply
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# cd /usr/lib/firefox-2.0.0.8/plugins
# ln -s /usr/java/jre1.6.0_03/plugin/i386/ns7/libjavaplugin_oji.so
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Confirm that F8 knows the location of Sun's Java binary
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# java -version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You should be seeing similar result like so:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
or something like this:
java version "1.5.0"
gij (GNU libgcj) version 4.1.2 20070502 (Red Hat 4.1.2-12)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now, apply the quick fix for the current bug like so
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# sed -i 's/XINERAMA/FAKEEXTN/g' /usr/java/jre1.6.0_03/lib/i386/xawt/libmawt.so
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5. Close and re open your firefox. Go to http://www.java.com/en/download/installed.jsp?detect=jre&try=1
You should be seeing Sun's initial windows as shown below
another alternative way to install java:
# sh jre-6u3-linux-i586.bin
(hit 'space' till the end, then type 'yes')
# v -f jre1.6* /opt/jre1.6
# ln -s /opt/jre1.6/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so
Controlling Java through 'alternatives'. When running the java command, Fedora will automatically pick the GNU Java, to use Sun's java do the following:
# sudo /usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.6/bin/java 2
# echo 2 | sudo /usr/sbin/alternatives --config java
for more info, visit:
http://www.java.com/en/download/linux_manual.jsp
posted on Mar 5, 2008 5:17 PM ()