Java JDK8u40 的 src.zip 在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29258944/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is the src.zip for JDK8u40?
提问by smwikipedia
I installed the JDK8u40, but only find the javafx-src.zip.
我安装了JDK8u40,但是只找到了javafx-src.zip。
Where can I find the source code for JDK? The src.zip?
我在哪里可以找到 JDK 的源代码?src.zip?
Below is what I get after installation:
下面是我安装后得到的:
And btw, I didn't see the installation wizard! This is quite strange.
顺便说一句,我没有看到安装向导!这很奇怪。
ADD 1
添加 1
Today I tried several Java installation packages. All are downloaded from Oracle official site.
今天试了几个Java安装包。都是从Oracle官网下载的。
- jdk-6u45-windows-i586.exe
- jdk-7u75-windows-i586.exe
- jdk-8u20-windows-i586.exe
- jdk-8u25-windows-i586.exe
- jdk-8u31-windows-i586.exe
- jdk-8u40-windows-i586.exe
- jdk-6u45-windows-i586.exe
- jdk-7u75-windows-i586.exe
- jdk-8u20-windows-i586.exe
- jdk-8u25-windows-i586.exe
- jdk-8u31-windows-i586.exe
- jdk-8u40-windows-i586.exe
Both 6u45
and 7u75
installed well on my box. I can see the install wizard. And the src.zip
is installed.
双方6u45
并7u75
在我的箱子装好。我可以看到安装向导。并且src.zip
安装了。
But 8u25
~ 8u40
all installed silently. And no src.zip file is installed because I have no chance to select it in the wizard.
不过8u25
~8u40
都安装好了。并且没有安装 src.zip 文件,因为我没有机会在向导中选择它。
I am not sure if this is my fault or someone at Oracle made a mistake.
我不确定这是我的错还是 Oracle 的某个人犯了错误。
As @SubOptimal commented, the /s
option indicates a silent install. I am wondering if there's an option to force the GUI install wizard to open.
正如@SubOptimal 所评论的,该/s
选项表示静默安装。我想知道是否有一个选项可以强制打开 GUI 安装向导。
I am using Windows 7 Enterprise x64 Build 7601 SP1
我在用 Windows 7 Enterprise x64 Build 7601 SP1
回答by Jean-Fran?ois Savard
Make sure the Source code
is not disabled when downloading.
确保Source code
下载时未禁用。
Then as you can see on the picture, selecting "Source Code" will tell you exactly where it is located.
然后就像你在图片上看到的那样,选择“源代码”会告诉你它的确切位置。
Notice that I've downloaded the 32 bits version to make sure to reproduce the same use case as you.
请注意,我已经下载了 32 位版本,以确保重现与您相同的用例。
Edit
编辑
As per your new edits and comments, it seems what you want to know now is why you don't see the installation wizards. I'm pretty sure this is due to old-set registry key.
根据您的新编辑和评论,您现在想知道的是为什么看不到安装向导。我很确定这是由于旧设置的注册表项造成的。
Run the following command
运行以下命令
reg query hklm\software\microsoft\windows\currentversion\installer\UserData\S-1-5-18\Products /f "java" /s | find "HKEY_LOCAL_MACHINE"
Now, navigate to each of the returned path browsing with regedit
and delete their entire parent (the big hexa number).
现在,导航到每个返回的路径浏览regedit
并删除它们的整个父级(大六进制数)。
Re-try the installation and I'm pretty sure you will see the wizard.
重新尝试安装,我很确定您会看到向导。
As for the sources, Oracle documentationspecify how to download them in silent mode.
至于来源,Oracle 文档指定了如何以静默模式下载它们。
jdk.exe /s ADDLOCAL="SourceFeature"
回答by gujralam
download JDK 8 from following link
从以下链接下载 JDK 8
http://www.oracle.com/technetwork/java/javase/jdk-8-readme-2095712.html
http://www.oracle.com/technetwork/java/javase/jdk-8-readme-2095712.html
src.zip comes in-built with it
src.zip 是内置的
回答by matrixanomaly
I don't know why/where the src.zip is, but as an alternative, if all you want is the source and somehow the proposed method doesn't work for you, you could always pull directly from the JDK8u40 source tree.
我不知道 src.zip 的原因/位置,但作为替代,如果您想要的只是源代码,并且以某种方式建议的方法对您不起作用,您始终可以直接从 JDK8u40 源代码树中提取。
You will need Mercurialinstead of Git. This link talks about the hg clone command
您将需要Mercurial而不是 Git。此链接讨论 hg clone 命令
Quoting from the OpenJDK Java.net site
The corresponding master forest jdk8u can be cloned using this command: hg clone http://hg.openjdk.java.net/jdk8u/jdk8u;cdjdk8u;sh get_source.sh .
In addition, the source code for the last release, 8u40, is available by cloning the 8u40 master forest : http://hg.openjdk.java.net/jdk8u/jdk8u40. The final build of that release was tagged as jdk8u40-b25.
可以使用以下命令克隆相应的主森林 jdk8u: hg clone http://hg.openjdk.java.net/jdk8u/jdk8u;cdjdk8u;sh get_source.sh 。
此外,最新版本 8u40 的源代码可通过克隆 8u40 主森林获得:http://hg.openjdk.java.net/jdk8u/jdk8u40 。该版本的最终版本被标记为 jdk8u40-b25。
There are differences between OpenJDK and Oracle's, though subtle
回答by S Kumar
This is the way I got the src folder from jdk-8u172-windows-x64.exe file without installing.
这是我从 jdk-8u172-windows-x64.exe 文件中获取 src 文件夹而不安装的方式。
Step1: Download jdk-8u172-windows-x64.exe file (Java SE Development Kit 8u172) from oracle site
Step1:从oracle站点下载jdk-8u172-windows-x64.exe文件(Java SE Development Kit 8u172)
Step2: Extract it and navigate to the path: \jdk-8u172-windows-x64.rsrc\1033\JAVA_CAB9
Step2:解压并导航到路径:\jdk-8u172-windows-x64.rsrc\1033\JAVA_CAB9
Step3: Right click on file named "110" and extract it.
步骤3:右键单击名为“110”的文件并将其解压缩。
You will get the src.zip file.
您将获得 src.zip 文件。
It took me little while to figure this out. I hope it will help others.
我花了一点时间才弄明白这一点。我希望它能帮助别人。
Enjoy debugging Good Code!
享受调试好的代码!
回答by Mr.Q
回答by stand alone
- Download the JDK
- Run the Installer, but stop right away
- Extract
src.zip
fromC:\Users\<your_username>\AppData\LocalLow\Oracle\ss180121.cab
- 下载 JDK
- 运行安装程序,但立即停止
- 提取
src.zip
自C:\Users\<your_username>\AppData\LocalLow\Oracle\ss180121.cab
You can extract .zip
from .cab
with tool like 7Zip
您可以提取.zip
从.cab
与像7Zip的工具