How to download & install JDK 6

By angsuman, Gaea News Network
Monday, September 28, 2009

I never thought I would have to write this article. Downloading Java was the simplest thing possible. Just go to java.sun.com and download the JDK. Unfortunately Sun has (intentionally?) complicated the procedure to such an extent that it almost takes an expert to download the proper version of JDK and without any extra and often unnecessary baggage.

Let’s call this article: The Art of Downloading & Installing JDK 6

What is the difference between JDK and JRE?

JDK is Java Development Kit. In simple words it contains programs (like javac ) to help you develop Java code. Any java develoepr must always download the JDK and not JRE. JDK includes everything JRE has and much more.

JRE is the Java Runtime Environment. In simple words it should be downloaded by anyone wishing to run Java Programs (Java applications, Java applets & Java WebStart Applications). Any Java user, other than a developer, should download JRE.

How can you download JDK 1.6?

Go to https://java.sun.com

On the right sidebar notice a section titled Popular Downloads. In there click on the link Java SE.

Ignore the section titled Java SE Development Kit (JDK) Bundles. Scroll down to the next section: Java SE Development Kit (JDK).

Now click on the Download link next to JDK 6 Update 16.
Note: In future the update number may increase as new fixes are released. When JDK 7 will be released, the link will also be named correspondingly.

Select the platform. You can see that downloads for Linux, Windows and Solaris is available. Choose 64 bit version if you have 64 bit operating system installed.
Note: I use Cent OS 64 bit, for example. So I selected Linux x64.

Check the checkbox next to I Agree to the Java SE Development Kit 6u16 License Agreement and click on Continue button.

Now you may find more than one download links. Choose the one more appropriate to your environment. Note: For Fedora, CentOS, RHEL systems, you should choose the link ending with rpm.bin. For example, I downloaded jdk-6u16-linux-x64-rpm.bin.

Finally, downloading should begin. Wait for the jdk download to complete.

How to install JDK 6 on Windows

Just double-click the executable and go with the default options

How to install JDK 6 on Linux

Login as root or su to root.

Open and terminal and go to the download directory.

chmod the permission of the file to 755. For example I did:
chmod 755 jdk-6u16-linux-x64-rpm.bin

Run the executable. For example I did:
./jdk-6u16-linux-x64-rpm.bin

Read the license by using PageDown key till you reach the end. Agree to the license terms by typing yes and then pressing Enter. Installation should proceed normally.
Note: At the very end you will be asked to press Enter again. It will open a browser window and ask you to register the JDK. It is optional.

Whew, finally you are done!

Discussion

mahesh
July 24, 2010: 6:36 am

thank u for clear information


connie
June 19, 2010: 9:26 pm

Really need to get please!


prasad
June 16, 2010: 10:47 am

it is very for the beginners to get understand the steps

June 15, 2010: 6:45 am

Thanks alot,this blog is very useful.
but i m getting a prblm as it is not compatible with windows7.If u knw hw to get jdk6 for windows7,plz tell


charan
February 27, 2010: 10:58 pm

it worked thanks


rajashekar
February 24, 2010: 9:55 am

sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
rajashekar@rajashekar:~/java$ sudo update-java-alternatives -s java-6-sun
update-java-alternatives: directory does not exist: /usr/lib/jvm/java-6-sun
rajashekar@rajashekar:~/java$
rajashekar@rajashekar:~/java$ sudo update-alternatives –config java
No alternatives for java.
rajashekar@rajashekar:~/java$ which java
rajashekar@rajashekar:~/java$ java -version
The program ‘java’ can be found in the following packages:
* gij-4.3
* java-gcj-compat-headless
* openjdk-6-jre-headless
* cacao
* gij-4.2
* jamvm
* kaffe
Try: sudo apt-get install
bash: java: command not found
rajashekar@rajashekar:~/java$ sudo apt-get install gij-4.3
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
rajashekar@rajashekar:~/java$
rajashekar@rajashekar:~/java$ /usr/bin/java
bash: /usr/bin/java: No such file or directory
rajashekar@rajashekar:~/java$ dpkg -l sun-java* | grep ii
rajashekar@rajashekar:~/java$ /usr/bin/java
bash: /usr/bin/java: No such file or directory
rajashekar@rajashekar:~/java$ update-alternatives –list jav
No alternatives for jav.
rajashekar@rajashekar:~/java$ update-alternatives –list java
No alternatives for java.


sam martin
February 15, 2010: 9:54 am

thank you for helpin me i have succesfully hacked runescape thanks 2 you


Chandima
January 20, 2010: 4:11 am

Thanks a lot mate.. It was really helpful.


Tr
January 2, 2010: 4:50 am

In jdk6, the environment variables (java_home, path)are needed to set or not for Window Server 2003? If needed, how should i do to set environment variables?


Vikram
December 15, 2009: 1:17 pm

Nice… helped me a lot…


Dick
November 17, 2009: 1:42 pm

Saved me lots of gastric distress. Well done piece. The SUN folks committed a mortal sin of systems analysis: “everybody knows what I know”.


Jiaren
November 13, 2009: 1:29 am

Thank you for your article! Actually, it already took me many time to try to find the correct location to download!

November 1, 2009: 12:12 am

Hi Taragana

Thanks for you efforts to IT people, nice blog.
I need just more bit information about “How to install JDK 6 on Solaris sparc 64 bit”.

Could you please help me to give the instruction or steps of install????

Regards.
Shweta
bd.shweta@gmail.com


Edgar Hner
October 23, 2009: 11:18 am

there is this nice things that the program checks if it is already installed on a computer. I wish to install it on a memory stick so i can carry it around with me. So when I want to install it on the memory stick, the progrm stops because it is already installed on the computer.

any idea how to solve this problem?

October 9, 2009: 4:06 am

Thanks angsuman. This saved me some time. Especially when the java.sun.com pages are so large and take a long time to load over a data modem, knowing that you’re going the right way is of great benefit!

October 8, 2009: 1:29 am

thanks for the clear info


jm
September 29, 2009: 12:21 pm

Good Article!. Thank you!

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :