Attach sources to JDK?

Hi,

I wanted to be able to see the source for:
com.sun.net.ssl.internal.ssl.AppInputStream
as I debugged something.

I downloaded: j2sdk-sec-1_4_2-src-scsl.zip from sun, this zip contains the source for the above class.

I then tried to "Configure JDK". Under sourcepath I added the path to the root of the classes tree within the zip that I needed:
PATH\j2sdk-sec-1_4_2-src-scsl.zip!/jsse1.4.2-src/src/share

But, IntelliJ still only shows "compiled code" instead of the source.

Am I doing this wrong? Is this a bug?

william

5 comments

This seems like a bug. You should file it, and in the meantime, you might want to try adding it as a library.

0

Wow, this is really odd now. I removed jsse from the JDK and added it as a library. I attached source to the library. It still doesn't work??

I can look inside the zip and see the class. I've attached source for many other things in the same way, so I'm quite sure I'm pointing to the right spot.

william

0

You want to make sure the name of the root package is directly below the folder you chose, so if the source tree looks like:

ec-1_4_2-src-scsl.zip!/jsse1.4.2-src/src/share/SOMETHINGELSE/javax

then you should chooseSOMETHINGELSE as the source directory.

0

Well, the file is here:
j2sdk-sec-1_4_2-src-scsl.zip!/jsse1.4.2-src\src\share\com\sun\net\ssl\internal\ssl\AppInputStream.java

In IntelliJ I pointed to:
j2sdk-sec-1_4_2-src-scsl.zip!/jsse1.4.2-src\src\share

as my source root. I also tried unzipping the file and pointing to the same place (for grins). I've tried this as part of the JDK, and as a separate library.

At this point, I think it's a bug, and have filed a change request.

Thanks for your help,

william

0

Bill Oberman wrote:

Well, the file is here:
j2sdk-sec-1_4_2-src-scsl.zip!/jsse1.4.2-src\src\share\com\sun\net\ssl\internal\ssl\AppInputStream.java

In IntelliJ I pointed to:
j2sdk-sec-1_4_2-src-scsl.zip!/jsse1.4.2-src\src\share

as my source root. I also tried unzipping the file and pointing to the same place (for grins). I've tried this as part of the JDK, and as a separate library.

At this point, I think it's a bug, and have filed a change request.


which is ... ?

might be related to my gripe :
http://www.intellij.net/tracker/idea/viewSCR?publicId=27545

0

Please sign in to leave a comment.