Skip to content

Instantly share code, notes, and snippets.

@der3k
Last active July 12, 2023 08:44
Show Gist options
  • Save der3k/2e67ab1183cdc00309f8 to your computer and use it in GitHub Desktop.
Save der3k/2e67ab1183cdc00309f8 to your computer and use it in GitHub Desktop.
How to create portable java SDK

Create portable version of Oracle JDK

From https://techtavern.wordpress.com/2014/03/25/portable-java-8-sdk-on-windows/

  1. Download the Java 8 SDK for Windows from Oracle. You will get a file named like java-8-windows-x64.exe. (http://www.oracle.com/technetwork/java/javase/downloads)

  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 into .jar files, 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"
  1. Delete *.pack files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment