简体   繁体   English

如何将JAVA 9 JRE / JDK作为zip文件而不是EXE或MSI安装程序?

[英]How can I get JAVA 9 JRE / JDK as a zip file rather than EXE or MSI installer?

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安装程序?

https://jdk9.java.net/download/ https://jdk9.java.net/download/

仔细查看https://jdk9.java.net/ ,其中“JDK 9 Early Access with Project Jigsaw”实际上是zip下载。

提及您可以下载拼图分发,或者您可以按照此处的说明构建您自己的分发。

您可以从jdk.java.net下载JDK 9 Early-Access Builds,不能访问/迁移所有其他位置( jdk9-buildsjdk9.java.net )。

From here: https://stackoverflow.com/a/6571736/8714033 从这里: https//stackoverflow.com/a/6571736/8714033

  • Create working JDK directory ( C:\\JDK in this case) 创建工作JDK目录(在这种情况下为C:\\JDK
  • [Download][1] latest version of JDK from Oracle (for example jdk-7u7-windows-x64.exe ) [下载] [1] Oracle最新版JDK(例如jdk-7u7-windows-x64.exe
  • [Download][2] and install 7-Zip (or download [7-Zip portable][3] version if you are not administrator) [下载] [2]并安装7-Zip(或下载[7-Zip portable] [3]版本,如果您不是管理员)
  • With 7-Zip extract all the files from jdk-XuXX-windows-x64.exe into the directory C:\\JDK 使用7-Zip将jdk-XuXX-windows-x64.exe所有文件jdk-XuXX-windows-x64.exe到目录C:\\JDK
  • Execute the following commands in cmd.exe : cmd.exe执行以下命令:
    • cd C:\\JDK\\.rsrc\\1033\\JAVA_CAB10
    • extrac32 111
  • Unpack C:\\JDK\\.rsrc\\1033\\JAVA_CAB10\\tools.zip with 7-zip 用7-zip解压缩C:\\JDK\\.rsrc\\1033\\JAVA_CAB10\\tools.zip
  • Execute the following commands in cmd.exe : 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) for /r %x in (*.pack) do .\\bin\\unpack200 -r "%x" "%~dx%~px%~nx.jar" (这会将所有.pack文件转换为.jar文件)
  • Copy all contents of C:\\JDK\\.rsrc\\1033\\JAVA_CAB10\\tools where you want your JDK to be 复制您想要JDK的C:\\JDK\\.rsrc\\1033\\JAVA_CAB10\\tools所有内容
  • Setup JAVA_HOME and PATH manually to point to your JDK dir and its BIN subdirectory. 手动设置JAVA_HOMEPATH以指向您的JDK目录及其BIN子目录。

Though my experience was a bit different, tools.zip can be in a different place depending on JDK version. 虽然我的经验有点不同,但根据JDK版本,tools.zip可以在不同的地方。

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

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