Portable Java 8 JDK on Windows

Yes, it is possible to extract the Java 8 JDK without administration privileges (a portable Java 8 JDK), although Oracle only provides an installer for windows. This recipe also works for Java 7.

Recipe for JDK 8 (update 93 and newer)

Prerequisite: Install 7-Zip file archiver (or its portable alternative).

  1. Download the Java 8 SDK for Windows from Oracle. You will get a file named like jdk-8u101-windows-x64.exe.
  2. Open the downloaded file with 7-Zip, which will show a a list of files and folders.
  3. Open folder ‘.rsrc’ (select and double click this folder within 7-Zip).
  4. Open folder ‘1033’ (or the folder of greatest size).
  5. Open folder ‘JAVA_CAB10’ (or the folder of greatest size).
  6. Open file ‘111’ (or the folder of greatest size).
  7. Open file ‘tools.zip’.
  8. Extract its contents to a directory where own write permissions, for example: C:\Users\Daniel\Documents\jdk-8u102-x64. To prevent issues, I recommend a directory without spaces.
  9. From within this directory, search for all .pack files and extract them using unpack2000.exe command line tool found in the bin subdirectory. Following windows prompt command does the trick when executed from within the extracted directory: for /r %i in (*.pack) do .\bin\unpack200.exe %i %~pi%~ni.jar

The downloaded .exe file also contains the JDK sources. Navigating through the folders ‘.rsrc’, ‘1033’, ‘JAVA_CAB9’, ‘110’.

Recipe for JDK 8 (update 92 and older)

Prerequisite: Install 7-Zip file archiver (or its portable alternative).

  1. Download the Java 8 SDK for Windows from Oracle. You will get a file named like jdk-8u74-windows-x64.exe.
  2. Open the downloaded file with 7-Zip, which will show a single archived file named tools.zip.
  3. Open the tools.zip from within 7-Zip.
  4. Extract its contents to a directory where own write permissions, for example: C:\Users\Daniel\Documents\java-8-sdk
  5. From within this directory, search for all .pack files and extract them using unpack2000.exe command line tool found in the bin subdirectory. Following windows prompt command does the trick when executed from within the extracted directory: for /r %i in (*.pack) do .\bin\unpack200.exe %i %~pi%~ni.jar