Learn How to download JDK source code?
How to download JDK source code?
This articles explains you how you can download the source code of JDK. You will learn how to download JDK source code and the unzip and see the source code of JDK.
This tutorial is very useful if you are looking for the source code to see the working of Java API. You can see the source code of JDK and understand how Java API works. You can also use the Eclipse IDE to browse the source code of JDK from the IDE itself.
How to download JDK source code?
JDK installer is packaged with the binary of the JDK as well as the source code of the JDK. You can download and install the JDK on your computer.
Visit http://www.oracle.com/technetwork/java/javase/downloads/index.html and then click on the link "Java Platform (JDK) xxx" as shown below:
Then accept the agreement and following screen will appear. Here is the screen shot which shows the correct link to download the installer.
After downloading the file double click and install the JDK and to see the source code go to the directory C:\Program Files\Java\jdk1.7.0_45\ directory. Here you will find the src.zip file which contains the source code of the JDK.
C:\Program Files\Java\jdk1.7.0_45\src.zip
You can unzip the src.zip file to see the source code of JDK.
How to get JDK source code on Ubuntu machine?
On Ubuntu machine you can use the "openjdk". You can use the following command to install JDK source on Ubuntu computer:
$sudo apt-get install openjdk-7-source
After installing the JDK you can find the src.zip file using find command.
In this tutorial you have learned how to get the JDK source code.
Tutorials on JDK