Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (Not For Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (Not For Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Thread Tools Search this Thread Display Modes
Old 27th May 2007, 03:00 PM
jonathonp Offline
Registered User
Join Date: Oct 2006
Location: Melbourne
Age: 46
Posts: 571
Simple guide to install or update java for Fedora 6 and 7

To update java go to the sun java website and download the latest update for Java Runtime Environment (JRE). http://java.sun.com/javase/downloads/index.jsp

The latest update at the moment is jre-6u2-linux-i586-rpm.bin

Place the file into your home directory.

* To remove your previous version of java if you have one you begin by typing the following into the terminal:

yum list installed|less
* This will list all of your installed rpms. To scroll down to the letter j and look for jre, press enter. My system didn't show 'jre' for whatever reason from the previous update.
* Remove your old java installation with the following command:

yum remove jre
* The next step is remove the java link that you previously made for your mozilla plugin. Type the following:

rm /usr/lib/mozilla/plugins/libjavaplugin_oji.so
* To install your new version of java type the following command:

sh ./jre-6u2-linux-i586-rpm.bin
[Start the installation process, accept agreement]

* Note you have to make changes to jre1.6.0_01 to execute the installation of your next update.
* The next step is to link java to mozilla plugins by using the following commands:

cd /usr/lib/mozilla/plugins/
ln -s /usr/java/jre1.6.0_02/plugin/i386/ns7/libjavaplugin_oji.so
* When you update java next time you have to change jre1.6.02 to the new filename. You can find this by looking in the usr directory such as /usr/java/jre1.6.0_02. i right click and copy the file and then paste it into bash. This gives me the file name and path.
Very handy!



* To run Java enabled applications such as the open source frostwire which is much better alternative to limewire for p2p file sharing. http://www.frostwire.com/

Do the following:

BEWARE it is not recommended to use the su - command for this instance as it can make a mess of the bash path creating a serious error rendering bash useless. I was never able to fix it. i had to reinstall 3 times until i figured out the 'su -' command was the problem for both my fedora 6 and 7 installations.

gedit /etc/profile.d/java.sh
* Insert the following text into the new file:

export JAVA_HOME
*Don't forget to save the edited file with a carriage return. This means that the cursor finishes on a blank line below the last line of text.
* More commands

source /etc/profile.d/java.sh
/usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.6.0_02/bin/java 2
/usr/sbin/alternatives --config java
* Remember to make changes where you see jre1.6.0_02 for your next java update.

* You should see the following screen if it's your first java installation:

There are 2 programs which provide 'java'.

 Selection    Command

*  1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
 + 2           /opt/jre1.6.0_02/bin/java		

               (jre1.6.0_02 is what you want so choose option +2)

(Enter to keep the current selection[+], or type selection number:)
__________________________________________________ _________________

* Type the following command:
/usr/sbin/alternatives --display java
* You should see following:

java - status is manual.
 link currently points to /opt/jre1.6.0_02/bin/java
/usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1420
 slave keytool: /usr/lib/jvm/jre-1.4.2-gcj/bin/keytool
 slave rmiregistry: /usr/lib/jvm/jre-1.4.2-gcj/bin/rmiregistry
 slave jre_exports: /usr/lib/jvm-exports/jre-1.4.2-gcj
 slave jre: /usr/lib/jvm/jre-1.4.2-gcj
/opt/jre1.5.0_10/bin/java - priority 2
 slave keytool: (null)
 slave rmiregistry: (null)
 slave jre_exports: (null)
 slave jre: (null)
/opt/jre1.6.0_02/bin/java - priority 2
 slave keytool: (null)
 slave rmiregistry: (null)
 slave jre_exports: (null)
 slave jre: (null)
Current `best' version is /usr/lib/jvm/jre-1.4.2-gcj/bin/java.

*You can test your java installation at http://www.javatester.org/version.html and http://www.java.com/en/download/installed.jsp

cheers johnny

Last edited by jonathonp; 22nd July 2007 at 08:16 AM. Reason: update new version
Reply With Quote
Old 27th May 2007, 03:13 PM
bob Online
Administrator (yeah, back again)
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 72
Posts: 23,250
(Moved to How-To)
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651

Don't use any of my solutions on working computers or near small children.
Reply With Quote

fedora, guide, install, java, simple, update

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple guide to create your own local repository for future re-installation backup jonathonp Guides & Solutions (Not For Questions) 8 8th April 2009 07:46 AM
Simple install guide for the edimax wireless 802.11b/ adpater (ralink rt73) Fedora 7 jonathonp Servers & Networking 10 27th January 2008 02:18 PM
Simple guide to setup multimedia (DVD Mp3) from 3rd party repositories jonathonp Guides & Solutions (Not For Questions) 6 20th July 2007 10:41 AM
Simple guide for VLC skin installation jonathonp Using Fedora 5 1st May 2007 10:32 AM
Java problem in fc4 (used install guide to install it) diamond Using Fedora 0 3rd November 2005 08:04 AM

Current GMT-time: 17:06 (Tuesday, 19-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat