简体   繁体   English

如何从java.net下载OpenJDK 8源代码

[英]How to download OpenJDK 8 source code from java.net

I need to have access to the source code of some classes from the sun.* packages of Java 8 for my project. 我需要从我的项目的Java 8的sun。*软件包中访问某些类的源代码。 I found it on https://download.java.net/openjdk/jdk8/ , but the link is for OpenJDK 8u0. 我在https://download.java.net/openjdk/jdk8/上找到它,但是该链接适用于OpenJDK 8u0。 I also found a link to 8u40 ( http://download.java.net/openjdk/jdk8u40/ri/openjdk-8u40-src-b25-10_feb_2015.zip ) from Googling, but I can't find any page on java.net that references it. 我还从Googling找到了指向8u40的链接( http://download.java.net/openjdk/jdk8u40/ri/openjdk-8u40-src-b25-10_feb_2015.zip ),但是我找不到Java上的任何页面。引用它的网。 How can I find a link to the latest stable OpenJDK 8 version (8u192) source code from java.net or at least something more recent than 8u40? 如何从java.net或至少比8u40更新的版本中找到到最新稳定的OpenJDK 8版本(8u192)源代码的链接?

Please note the following: 请注意以下事项:

  1. I specifically want the source code of OpenJDK 8 because the Oracle JDK source code doesn't contain the sun.* packages that I need. 我特别想要OpenJDK 8的源代码,因为Oracle JDK源代码不包含我需要的sun。*软件包。
  2. I'm aware that public updates for Java 8 stop after 8u202 that will be released this month. 我知道Java 8的公共更新将在本月发布的8u202之后停止。 As I only need the source code for reference, it doesn't matter in my case. 因为我只需要参考源代码,所以在我的情况下这无关紧要。
  3. I would prefer OpenJDK directly from Oracle (from java.net) instead of third-party vendors like Adopt or Azul. 我希望直接从Oracle(来自java.net)获得OpenJDK,而不是像Adopt或Azul这样的第三方供应商。
  4. This question is not "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource" because I don't ask for any recommendations or opinions. 这个问题不是“要求我们推荐或找到书籍,工具,软件库,教程或其他非现场资源的问题”,因为我不要求任何建议或意见。 I'm asking for source code for a very specific thing that should be publicly available as OpenJDK is an open source project. 我要的是一个非常具体的东西的源代码,因为OpenJDK是一个开源项目,因此应该公开可用。

First of all. 首先。 Oracle JDK is in essence OpenJDK because Oracle handed over (nearly) the whole stuff over to OpenJDK. Oracle JDK本质上​​是OpenJDK,因为Oracle(几乎)将所有内容移交给了OpenJDK。 Oracle JDK can be seen as one VM based on OpenJDK as there are others. 可以将Oracle JDK视为基于OpenJDK的一种虚拟机,还有其他虚拟机。 What is stopping this month is the free availability of OracleJDK-updates, etc. but that has no effect on the other VMs out there. 本月停止的活动是免费提供OracleJDK更新等,但这对那里的其他VM没有影响。

The source can be accessed (including newer versions after Oracle stops their free support) at the Mercurial Repositories at http://hg.openjdk.java.net . 可以在http://hg.openjdk.java.net的Mercurial存储库中访问源(包括Oracle停止免费支持后的较新版本)。 The sources you're looking for should be available at http://hg.openjdk.java.net/jdk/jdk/tags 您正在寻找的资源应该可以在http://hg.openjdk.java.net/jdk/jdk/tags获得

Edit: Because you asked in a later comment in your question: You can download the source of a given project by clicking onto one of the links on the left side of the page showing the names of archive-files (bz2, zip tar) at the start-page of a given tag. 编辑:因为您在稍后的问题中提出了疑问:您可以通过单击页面左侧显示存档文件名称的链接之一(bz2,zip tar)来下载给定项目的源。给定标签的起始页。

Edit2: Because you asked for Java 1.8.0_192 (I assume b26), you can use http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/archive/996dd3ce1ec5.zip . Edit2:因为您要求输入Java 1.8.0_192(我假设是b26),所以可以使用http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/archive/996dd3ce1ec5.zip Here are the steps to get to it: From the main page go to the Project jdk8u ( http://hg.openjdk.java.net/jdk8u ). 遵循以下步骤:从主页转到Project jdk8u( http://hg.openjdk.java.net/jdk8u )。 Select jdk8u-dev->JDK ( http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/ ). 选择jdk8u-dev-> JDK( http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/ )。 Click on "Tags" ( http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/tags ), select "jdk8u192-b26 " ( http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/rev/996dd3ce1ec5 ) and click on one of the archive-formats on the left, eg ZIP (see above). 单击“标签”( http://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/tags ),选择“ jdk8u192-b26”( http://hg.openjdk.java.net/jdk8u/ jdk8u-dev / jdk / rev / 996dd3ce1ec5 ),然后单击左侧的一种存档格式,例如ZIP(请参见上文)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM