I'd like to get at least one JRE/JDK level on my Windows machine where I have the JRE/JDK source that matches the exact level of the JRE/JDK. My purpose is to be able to go into the system classes while debugging. Any suggestions about how to do this? Thanks in advance.
The source code is included in the JDK 1.5+ installer. Just make sure that the option is not unchecked while installing.
Just install the JDK. It will install a private JRE too and the source will match.
If you need a specific JDK, see here: http://java.sun.com/products/archive/
Most of the useful source will be in the src.zip file in your JDK.
You can get source up to jdk 6u3 from jdk6.dev.java.net. On Linux you can get OpenJDK source and packages from openjdk.java.net.
If you're using eclipse, you can bind the JDK to its source if it is not done automatically. This is done in Window > Preferences > Java > Installed JREs. You edit one of the listed JRE/JDK and for each jar on 'System libraries' you indicate what's the src (you can set the zip that comes with the JDK for instance). This way you can debug any JDK class.
I had this problem for a long time; the source-download site must just not have been maintained for a while there.
It seems fixed now, though:
http://download.java.net/jdk6/6u10/archive/
(Has links for all the JDK 6 source downloads, not just 6u10.)