Saturday, November 17, 2007

Sun Java on Fedora 8 Install HowTo

I am now here creating an installation howto of Sun Java on my newly installed Fedora 8 box. It took me a few days trying to make the latest Sun's Java work perfectly with my F8, which was the main reason why the recent blog entry was created too.

Fedora 8 ships with its own version of Java clone which works out right as well. However if you wish to install Sun's Java version, read more below.

There was a bug from Sun's Java on which you can read more from here.

This linux blog entry aims to avoid those dirty attempts and headaches on trying to successfully install Sun's Java on F8. The current Sun Java version as of this writing is 1.6.0_03 .

IT IS important to install one java version only, either a java from Fedora 8 or from Sun.

Java IcedTea Installation Removal

Now, to remove the Java version that comes from Fedora 8 distro, simply

# yum remove java-*-icedtea java-*-icedtea-devel java-*-icedtea-plugin


SUN JAVA INSTALLATION on FEDORA 8

Here are the simple steps on how to install Sun Java on Fedora 8 and make it work.

Step One

Download Sun Java's self-extracting file (roughly 18MB) from here.

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.

Step Two

Launch your terminal. Install the following library modules needed by Sun Java.

# yum -y install compat-libstdc++-33 compat-libstdc++-296


FOR RPM-BASED INSTALLATION
(thanks to Hilel for noticing a mixed non-rpm and rpm based installation instructions)

Step Three

Now, go to your downloaded self-extracting file and issue the following commands

# cd ~Desktop
# chmod 700 jre-6u3-linux-i586-rpm.bin
# ./jre-6u3-linux-i586-rpm.bin


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.

Step Four

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


Sun Java Installation Verification on Fedora 9

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)


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. You should be seeing Sun's initial windows as shown below


Sun Java's initial image greeting like so:


Proceed with Java's test page from any link here.

The above successful Sun's Java installation was done on a newly installed Fedora 8 box. The box does not contain any non-Sun Java version.

You might be interested with the black box around, thanks for any support. Have a nice weekend!

***Propriety and commercial software and packages mentioned here are all trademarks and copyrights owned and managed by their own respective company.

Related Articles:

Sun Java Installation on Fedora 9

Java IcedTea Installation on Fedora 8

Sun Java and Java IcedTea Simultaneous Installation on Fedora

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy