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)


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.

  • 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.


You can download a Java Portable from PortableApps.com. It will not change your system settings. You can put it on your USB stick.

UPD: for those who needs JDK there's an open-source project OpenJDK Portable

UPD2: there is also a JDK Portable (Oracle)

Some people might be interested in official Oracle production-ready open source build of JDK