How To Install Sun Java SE 6 JDK and NetBeans 5.5.1 - Fedora 7

Version 1.0
Author: Tomo Popovic (tpop2005 [at] yahoo.com)

This tutorial shows how to install Sun Java JDK and NetBeans IDE on the fresh Fedora 7 installation. The readers I had in mind when assembling this are the people who are anxious to start using NetBEans and Sun's Java SE on their newly installed Fedora systems. Some of the bits and pieces on the topics I found on the Internet are assembled into this tutorial in order to make it as comprehensive as possible. I tried to follow the HowToForge document format. I have not tried this on the x64 architecture, but it should be very similar. I would welcome any feedback on that.

An assumption is that Fedora's default Java is already installed. For example, as it is in the situation after installing Fedora 7 as described in the article The Perfect Setup - Fedora 7 by Mr. Falco Timme, which I highly recommend. We will use Mozilla Firefox to access different websites and Fedora's system terminal to run commands.

1 Preliminary Note

My goal is to install Sun Java SE 6 JDK and Netbeans 5.5 so that both are accessible for all users. The tutorial includes proper configuring of Java library documentation and configuring of NetBeans's basic parameters. After installation both java and javac from Sun's Java SE 6 JDK will be accessible for all users in through terminal window as well as from within NetBeans 5.5 IDE.

2 Downloading and Installing Sun's Java SE 6 JDK

First go to Sun's Java SE Downloads page and download latest JDK (JDK 6 Update 2 at the time this article is made).

Sun Java SE 6 JDK and NetBeans 5.5.1 on Fedora 7 - Pic0

Click on Donwload button, then select Accept License Agreement, and check the box next to Linux RPM in self-extracting file (jdk-6u2-linux-i586-rpm.bin). Save file under /home/tomo/Desktop folder.

Sun Java SE 6 JDK and NetBeans 5.5.1 on Fedora 7 - Pic1

Assuming that the file has been downloaded to your desktop folder (in my case /home/tomo/Desktop) open your terminal by clicking on menu in Applications/System Tools/Terminal and in the terminal window execute the following commands.

To become root:

su

Change working folder to your Desktop:

ch /home/tomo/Desktop

Make the JDK installer file executable:

chmod a+x jdk-6u2-linux-i586-rpm.bin

Finally, execte JDK install:

./jdk-6u2-linux-i586-rpm.bin
Sun Java SE 6 JDK and NetBeans 5.5.1 on Fedora 7 - Pic2

Click on space to scroll down to the end of the license agreement, then type in yes and let the installer unzip the RPM files and perform the installation.

Sun Java SE 6 JDK and NetBeans 5.5.1 on Fedora 7 - Pic3
Sun Java SE 6 JDK and NetBeans on Fedora 7 - Pic 4

After the installation has been done you can delete installer and the temporary files it created on your desktop by issuing the following commands:

rm jdk-6u2-linux*
rm sun-java*.rpm

Type y when prompted to delete each file (make sure you are not deleting something else).

This should install JDK on your Fedora 7. This part pretty much follows the instructions from Sun's website. Please check Java SE 6 Linux Release Notes Linux Installation (32-bit).

Share this page:

1 Comment(s)