Java SE Development Kit (JDK) installation on Fedora 8.

Java problems? Java not working on Fedora 8? Well, this guide will cover the installation of the Sun Microsystems' JDK 6 Update 3 on Fedora 8 which will require that "icedtea" be removed. The JDK is a development kit which contains the programming utilities, compiler, appletviewer, and of course the java plugin for mozilla firefox which will install automatically and create links required.

Although this guide is for JDK 6 update 3, some modification have been made so that java update 5 installation will work. The installation of the current update is very similar to java update 6.3. The download procedure might vary a bit but the rest of the instruction should be pretty much the same.

(Important: Read agreement at bottom of document before continuing)

Downloading the JDK 6 Update 3

  1. Download the JDK 6 Update 3 from Sun Microsystems. Click on this link JDK 6 Update 3.(Although the link says JDK java update 3, the link will actually give you the current update.)

  2. Now click on the Download button over to the right for the JDK 6 Update 3.





  3. On the next screen, click on the radio button to accept license agreement.





  1. Now click on the 'Linux RPM in self-extracting file (jdk-6u3-linux-i586-rpm.bin)'. The file you download will differ in name for you depending on the java version.



  2. Save the file to disk in a directory of your choice(e.g. /tmp or your Desktop, I will use the /tmp directory.






  1. Click on Applications-System Tools-Terminal to open a terminal and then switch to root user. Make the directory /opt/java and move the java JDK file to it. Pay close attention when you run the command mv /tmp/jdk* /opt/java because it might not work if you saved the java file somewhere else. So, make sure to use the correct path of the location of the java update you downloaded.

    [jesse@localhost ~]# su -
    Password:
    [root@localhost ~]# mkdir /opt/java
    [root@localhost ~]# mv /tmp/jdk* /opt/java


  2. Let's remove the 'icedtea java' because it doesn't load the applets. I could not get it to work with any applets other than with Sun's java test webpage, which displayed a dancing character. Also, JDK java plugin wouldn't work with icedtea installed. Once removed, JDK worked fine.

    [root@localhost ~]# yum list | grep icedtea | xargs yum -y remove


  1. Now lets add all java (GNU libgcj) packages for the open source java. We want to be able to switch back and forth if need be.

    [root@localhost ~]# yum install '*gcj*'

  2. Install wget just in case it is not installed and switch to repos directory.

    [root@localhost ~]# yum install wget
    [root@localhost ~]# cd /etc/yum.repos.d

    Add the JPackage key and repository.

    [root@localhost yum.repos.d]# rpm --import http://jpackage.org/jpackage.asc
    [root@localhost yum.repos.d]# wget http://www.jpackage.org/jpackage17.repo

  3. Now disable the JPackage17 repository so it won't check it for updates. I had some problems with update dependencies coming from this repository.


    [root@localhost yum.repos.d]# gedit jpackage17.repo


  4. Change the highlighted line, enabled=1 to enabled=0 and save the file and exit.


    [jpackage-generic]
    name=JPackage (free), generic
    mirrorlist=http://www.jpackage.org/jpackage_generic_1.7.txt
    failovermethod=priority
    gpgcheck=1
    gpgkey=http://www.jpackage.org/jpackage.asc
    enabled=1


  1. Now install some tools and compatibility utilities.

    [root@localhost yum.repos.d]# yum -y install rpmdevtools rpm-build compat-libstdc++-33 compat-libstdc++-296

  2. Switch to directory /opt/java and run java JDK installation package. Make sure the highlighted text 6u5 matches your java version, so check your filename and change accordingly. Once you start the installation, press the spacebar until you are prompted to agree to licensing terms. Type 'yes' to answer question and hit enter.

    [root@localhost yum.repos.d]# cd /opt/java
    [root@localhost java]# chmod 755 jdk-6u5-linux-i586-rpm.bin
    [root@localhost java]# ./jdk-6u5-linux-i586-rpm.bin

  3. Install the JPackage Java compatibility package for Sun's JDK

    [root@localhost java]# yum --enablerepo=jpackage-generic-nonfree install java-1.6.0-sun-compat

  4. Configure JDK to be your default java.

    [root@localhost java]# 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/lib/jvm/jre-1.6.0-sun/bin/java


    Enter to keep the current selection[+], or type selection number:

    Enter 2 to make JDK your default java and press Enter.


  5. Now double check to see if JDK is your default java.

    [root@localhost java]# java -version
    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)

    If you don't get the output above then something went wrong. Try retracing your steps.


  1. Open a browser and go to a website that runs java applets. This one will work: Sun java test.




    If you see this dancing character and you see 'Java 6 update 3' then your java is configured correctly.





Agreement

This guide is provided as is with no warranty, garantee, or liability of any kind. Use it at your own risk. I am not responsible for any damages arising from the use of this guide. If you agree to these terms than you will use the guide with the understanding that you will not hold me responsible for any damages, whatever their nature, resulting from the use of this guide.





Comments






Message posted on Tuesday, December 18, 2007 at 11:53:12 pm By: Jesse
No picture
Available
I hope this guide helps someone with Java as I had a heck of a time getting it to work, so when I got it to work, I decided to write this guide. Cheers!
Message posted on Friday, March 14, 2008 at 11:10:27 pm By: JeSus
omg i hate java made my life miserable ^^ :P

and thank you onece gain on finding out what was wrong with my computer and then having the time to fix it damn java didnt wanted too work >.
thanks again!!^^ xD
Message posted on Saturday, March 15, 2008 at 02:27:57 pm By: Jesse
It was my pleasure. I hope you enjoy Fedora. Remeber, the power is at the command prompt. The more you know, the better you will be able to control how to manage a linux environment. I love it.
Message posted on Friday, October 31, 2008 at 06:23:31 pm By: cialis
No picture
Available
hello, thanks authors. exellent post





Post your Comments






Enter your message:

Your name:

Date: Friday-November-21-2008 02:38:19 am
(Actual time will vary at the time the message is posted.)

You can also leave a picture to go with your message.(optional)
All image types supported.
Picture to upload:

Message: