The JDK source code is inside the src.zip
, this article shows you how to get it on Windows, Ubuntu (Linux) and Mac OSX.
1. Windows
Java 1.8.0_121 Download
In Windows, visit the Oracle website and download the JDK (not JRE).
Install the JDK and the src.zip
is inside the JDK installed folder, for example :
2. Ubuntu (*nix)
In Linux, for example, Ubuntu, you can get the source code from OpenJDK.
Search “openjdk”
Install the source code.
Java SE Development Kit 8 Downloads. Thank you for downloading this release of the Java™ Platform, Standard Edition Development Kit (JDK™). The JDK is a development environment for building applications, applets, and components using the Java programming language. Latest Java 8 Update 121 is now available for download. No more chitchat, go to the direct offline download link. Java SE 8u121 (Java SE 8 update 121) is now available. Oracle strongly recommends that most Java SE users upgrade to the latest Java 8 update, which includes important security fixes.
Download Java 1.8.0.121
3. Mac OSX
In Mac OSX, get the JDK source code from Apple Developer, and download and install the Java for OS X Developer Package.
Later, find the source code here.
Refer to this detail guide on how to download JDK Source Code For Mac OS X