如何将 JAVA 9 JRE/JDK 作为 zip 文件而不是 EXE 或 MSI 安装程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33322758/
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
How can I get JAVA 9 JRE / JDK as a zip file rather than EXE or MSI installer?
提问by vaquar khan
How can I get JAVA 9 JRE / JDK as a zip file rather than EXE or MSI installer?
如何将 JAVA 9 JRE/JDK 作为 zip 文件而不是 EXE 或 MSI 安装程序?
采纳答案by Paul Verest
Look at https://jdk9.java.net/carefully there's "JDK 9 Early Access with Project Jigsaw" that is actually zip download.
仔细查看https://jdk9.java.net/有“JDK 9 Early Access with Project Jigsaw”,它实际上是 zip 下载。
回答by Pahari Chora
You can download JDK 9 zip file from Java Platform, Standard Edition 9 Reference Implementations
您可以从Java Platform, Standard Edition 9 Reference Implementations下载 JDK 9 zip 文件
回答by ftr
回答by Chandra Sekhar
You can download JDK 9 Early-Access Builds from jdk.java.net, All other locations (jdk9-builds, jdk9.java.net) are not accessible/migrated.
您可以从jdk.java.net下载 JDK 9 Early-Access Builds ,所有其他位置(jdk9-builds、jdk9.java.net)均不可访问/迁移。
回答by Chris Thistlethwaite
From here: https://stackoverflow.com/a/6571736/8714033
从这里:https: //stackoverflow.com/a/6571736/8714033
- Create working JDK directory (
C:\JDK
in this case) - [Download][1] latest version of JDK from Oracle (for example
jdk-7u7-windows-x64.exe
) - [Download][2] and install 7-Zip (or download [7-Zip portable][3] version if you are not administrator)
- With 7-Zip extract all the files from
jdk-XuXX-windows-x64.exe
into the directoryC:\JDK
- Execute the following commands in
cmd.exe
:cd C:\JDK\.rsrc\1033\JAVA_CAB10
extrac32 111
- Unpack
C:\JDK\.rsrc\1033\JAVA_CAB10\tools.zip
with 7-zip - Execute the following commands in
cmd.exe
:cd C:\JDK\.rsrc\1033\JAVA_CAB10\tools\
for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"
(this will convert all.pack
files into.jar
files)
- Copy all contents of
C:\JDK\.rsrc\1033\JAVA_CAB10\tools
where you want your JDK to be - Setup
JAVA_HOME
andPATH
manually to point to your JDK dir and its BIN subdirectory.
- 创建工作 JDK 目录(
C:\JDK
在本例中) - [下载][1] 来自 Oracle 的最新版 JDK(例如
jdk-7u7-windows-x64.exe
) - [下载][2] 并安装 7-Zip(如果您不是管理员,请下载 [7-Zip 便携版][3] 版本)
- 使用 7-Zip 将所有文件从
jdk-XuXX-windows-x64.exe
目录中解压缩C:\JDK
- 在 中执行以下命令
cmd.exe
:cd C:\JDK\.rsrc\1033\JAVA_CAB10
extrac32 111
C:\JDK\.rsrc\1033\JAVA_CAB10\tools.zip
用 7-zip打开包装- 在 中执行以下命令
cmd.exe
:cd C:\JDK\.rsrc\1033\JAVA_CAB10\tools\
for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"
(这会将所有.pack
文件转换为.jar
文件)
- 复制
C:\JDK\.rsrc\1033\JAVA_CAB10\tools
您希望 JDK 所在位置的所有内容 - 设置
JAVA_HOME
并PATH
手动指向您的 JDK 目录及其 BIN 子目录。
Though my experience was a bit different, tools.zip can be in a different place depending on JDK version.
虽然我的经验有点不同,但根据 JDK 版本,tools.zip 可以位于不同的位置。