JDK / JRE源代码与匹配的JSSE(SSL)源代码和匹配的可运行JDK / JRE? [英] JDK/JRE source code with matching JSSE (SSL) source code and matching runnable JDK / JRE?

查看:126
本文介绍了JDK / JRE源代码与匹配的JSSE(SSL)源代码和匹配的可运行JDK / JRE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过在哪里可以找到Java 6 JSSE / JCE源代码?
并自行询问问题
如何获得具有匹配源的JRE / JDK?但我不知道其中任何一个都具体到足以得到我真正追求的答案,所以我将尝试更具体的问题版本。

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.

基本上我要解决的问题是我希望能够在Windows上使用我的Eclipse调试器并进入Java SSL类(JSSE)帮助我调试SSL问题,以及更好地理解SSL过程。 BTW我熟悉(并使用)javax.net.debug = ssl | all系统属性来获取SSL跟踪,虽然这非常有用,但我仍然希望能够逐步完成那些讨厌的代码。

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:


  1. 可执行的JRE / JDK实现(不想构建一个)...

  2. 在我的Windows平台(XP)上运行......

  3. 包括源代码......

  4. 该源包含SSL位(JSSE等)......

  5. 理想情况下,SSL实现是Sun或OpenJDK版本。

  1. An executable JRE / JDK implementation (not wanting to build one)...
  2. That runs on my Windows platform (XP)...
  3. That includes source...
  4. And that source includes the SSL "bits" (JSSE, etc.)...
  5. And ideally the SSL implementation is Sun's or the OpenJDK version.

我认为最接近的事情(如PW的回答中所述 StackOverflow:87106 )是OpenJDK源代码openjdk-6-src-b12-28_aug_2008.tar.gz在< a href =http://download.java.net/openjdk/jdk6/ =nofollow noreferrer> OpenJDK 6 Source Release ,但我不确定那里一个匹配的可执行JDK / JRE,用于在Windows上运行。

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.

推荐答案

您可以获取JSSE lib的源代码(Open JDK实现)这里 - http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/file/4d6c03fb1039/src/share/classes/sun/security/ssl

You can get the source code of JSSE lib (Open JDK implementation) here - http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/file/4d6c03fb1039/src/share/classes/sun/security/ssl

创建源jar文件以附加到IDE进行调试的步骤。

Steps to create a source jar file for attaching to an IDE for debugging.


  1. 在目录结构中稍微高一点,即 http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/file/4d6c03fb1039/src/ share / classes / repo。

  2. 点击左侧窗格中显示的zip或gz链接,下载源包。

  3. 但是这个包非常庞大,包含数千个* .java文件。您通常不希望所有这些只是调试jsse.jar代码。

  4. 所以最好只复制 sun.security.rsa sun.security.ssl sun.security.provider & com.sun.net.ssl 将软件包打包到计算机上的新文件夹(例如jsse-code)。

  5. 从命令行& ;;转到该文件夹​​。自己创建源jar。例如,
    jar -cvf jsse-src.jar *

  6. 你完成了。您现在拥有了可以附加到首选IDE(例如Eclipse)的jsse源代码库来调试JSSE代码。

  1. Go a little above in the directory structure i.e. to http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/file/4d6c03fb1039/src/share/classes/ repo.
  2. Download the source package by clicking on the "zip" or "gz" links that you see at the left pane.
  3. 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.
  4. 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.
  5. Go to that folder from command line & create the source jar on your own.
    e.g. jar -cvf jsse-src.jar *
  6. 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.

谢谢


Ayas

Thanks
Ayas

这篇关于JDK / JRE源代码与匹配的JSSE(SSL)源代码和匹配的可运行JDK / JRE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆