Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
332 views
in Technique[技术] by (71.8m points)

java - How can I get the latest JRE / JDK as a zip file rather than EXE or MSI installer?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

JDK is not available as a portable ZIP file, unfortunately. However, you can follow these steps:

  • Create working JDK directory (C:JDK in this case)
  • Download latest version of JDK from Oracle (for example jdk-7u7-windows-x64.exe)
  • Download and install 7-Zip (or download 7-Zip portable version if you are not administrator)
  • With 7-Zip extract all the files from jdk-XuXX-windows-x64.exe into the directory C:JDK
  • Execute the following commands in cmd.exe:
    • cd C:JDK.rsrc1033JAVA_CAB10
    • extrac32 111
  • Unpack C:JDK.rsrc1033JAVA_CAB10ools.zip with 7-zip
  • Execute the following commands in cmd.exe:
    • cd C:JDK.rsrc1033JAVA_CAB10ools
    • for /r %x in (*.pack) do .inunpack200 -r "%x" "%~dx%~px%~nx.jar" (this will convert all .pack files into .jar files)
  • Copy all contents of C:JDK.rsrc1033JAVA_CAB10ools where you want your JDK to be
  • Setup JAVA_HOME and PATH manually to point to your JDK dir and its BIN subdirectory.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...