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

12 Responses to Portable Java 8 JDK on Windows

  1. Mika says:

    you’re missing quotes if path has spaces in it:

    for /r %i in (*.pack) do .\bin\unpack200.exe “%i” “%~pi%~ni.jar”

  2. Pingback: Java 8 e Bluej su chiavetta | Il mestiere di docente

  3. Sorn Persen says:

    Thanks for the useful information.

  4. Pesho says:

    Thank you! It works!

    Note: the for /r %i in (*.pack) do .\bin\unpack200.exe %i %~pi%~ni.jar script to work, the folder in which the Java SDK is extracted must be with a name containing no spaces

  5. Dik Pater says:

    Thank you all, now I can run sqldeveloper latest version on my work laptop without admin rights.
    Regards,
    Dik Pater

  6. Donizete says:

    Using for unpack and rename file:

    for /r . %i in (*.pack) do set arq=%i&set arq=%arq:pack=jar%&.\bin\unpack200.exe “%i” “%arq%”

  7. Pingback: Confluence: Infrastruktur

  8. Venu says:

    Thanks. Following your steps helped me make a portable JDK 8u65.

  9. ishara says:

    thank you very much…it works fine

  10. coba says:

    thank you, this helped me

  11. Bruno says:

    Thanks, except the phrase ”The downloaded .exe file also contains the JDK sources. Navigating through the folders ‘.rsrc’, ‘1033’, ‘JAVA_CAB9’, ‘110’.’
    is unclear to me.
    Kind regards

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: