I have seen Where to find Java 6 JSSE/JCE Source Code?
and asked the question myself
How to get JRE/JDK with matching source? but I don't either of these was specific enough to get the answer I was really after, so I'm going to try a way more specific version of the question.
Basically the problem that I am trying to solve is that I would like to be able to use my Eclipse debugger on Windows and step into the Java SSL classes (JSSE) to help me debug SSL issues as well as to just understand the SSL process better. BTW I am familiar with (and use) the javax.net.debug=ssl|all system property to get SSL tracing and, while this is very helpful, I'd still like to be able to step through that pesky code.
So what I think I specifically need is:
An executable JRE / JDK implementation (not wanting to build one)...
That runs on my Windows platform (XP)...
That includes source...
And that source includes the SSL "bits" (JSSE, etc.)...
And ideally the SSL implementation is Sun's or the OpenJDK version.
I think the closest thing (as noted in PW's answer StackOverflow: 87106) is the OpenJDK source openjdk-6-src-b12-28_aug_2008.tar.gz found at OpenJDK 6 Source Release, but I'm not sure there's a matching executable JDK / JRE for that that would run on Windows.
解决方案
Steps to create a source jar file for attaching to an IDE for debugging.
Download the source package by clicking on the "zip" or "gz" links that you see at the left pane.
But this package is huge and contains thousands of *.java files. You do not normally want all of these to just debug jsse.jar code.
So better copy only the sun.security.rsa , sun.security.ssl , sun.security.provider & com.sun.net.ssl packages to a new folder (lets say jsse-code) on your computer.
Go to that folder from command line & create the source jar on your own.
e.g.
jar -cvf jsse-src.jar *
You are done. You now have your jsse source lib that you can attach to your preferred IDE (e.g. - Eclipse) to debug the JSSE code.
Thanks
Ayas