10

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.

0

5 Answers 5

9

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.

2
  • You'll probably want JDK classes with debugging info compiled in. Either compile the sources yourself or download the appropriate version. For example JDKu18 currently has a download for the DEBUG version here: download.java.net/jdk6 Commented Jan 13, 2010 at 1:31
  • The JDK rt.jar at least has source line number debugging information (it appears in stack traces). Commented Jan 13, 2010 at 2:07
5

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.)

0

The source code is included in the JDK 1.5+ installer. Just make sure that the option is not unchecked while installing.

0

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/

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.