Where can I find the source code for the Java library classes? I mean classes in rt.jar
.
Platform: Windows.
Sources are in src.zip
located in the installation folder:
On Windows, the JDK includes src.zip
by default if I remember well.
On a Linux distro, you may have to install the sun-java6-source
package.
On Mac, you'll have to download the Developer Documentation. Have a look at this answer.
Here's the browsable source code for OpenJDK 7.
Update: As of June 2018 grepcode seems to be down. Here you can find an alternative.
Update^2: As of October 2020, the two previous links do not work. View it at OpenJDK and vote up the answer by Nosrep, which I got it from.