Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I like to be sure that everything will work just by copying the contents of the Java folder and setting the environment variables.

I usually run the installer in a virtual machine, zip the \java folder contents, go back to a snapshot of the virtual machine, and then unzip the compressed file.

I couldn't find a place where the latest JRE / JDK is available as a zip file...

http://java.sun.com/javase/downloads/index.jsp

http://download.java.net/jdk6/

Alternately, is it safe to assume that exe installer from sun just will just unzip the whole thing, without messing around with the registry, environment variables, etc...?

Related: Installing Java manually on Windows?

-- After all this time I found this site that seems to be exactly what I was looking for (2018-05-22)

like image 591
opensas Avatar asked Oct 25 '09 01:10

opensas


People also ask

Which version of JRE is latest?

The latest version is 16 now.

Where can I get new JRE?

Downloading the Java Runtime Environment You can download the JRE free of charge from Oracle. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html . Under Java Platform, Standard Edition, select either the current release, or click Previous Releases to install an earlier supported version.

Where can I find JRE in JDK?

The JRE Installer is located on the Java SE Runtime Environment 9 Downloads page. In a browser, go to the Java SE Runtime Environment 9 Downloads page. The following JRE installers are available for you to download: Windows Offline: jre-9.

Which should I download JDK or JRE?

Download the JDK if you want to do Java development. The JDK comes with the Java compiler (javac) which you will need for development. The JRE is the run time environment only - get this if you only want to run Java programs. If you get the JDK it comes with a JRE included so you don't need to get the JRE separately.


2 Answers

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\.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 and PATH manually to point to your JDK dir and its BIN subdirectory.
like image 77
Igor Avatar answered Sep 28 '22 21:09

Igor


  • Create destination folder where you can RWX (e.g. C:\jdk8)
  • Download jdk exe from Oracle (e.g. jdk-8u72-windows-x64.exe)
  • Unzip the tools.zip found inside it into the destination folder
  • In cmd.exe, run:
    • cd C:\jdk8
    • for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"

This solution works for JDK 8 too, without Admin rights.

like image 25
Marc T Avatar answered Sep 28 '22 23:09

Marc T