Skip to content

Convert JDK 9 from EXE to ZIP

Last Updated on 15/11/2020

Since Oracle doesn’t provide JDK 9 as portable ZIP for Windows, this tutorial will show how to convert JDK 9 from EXE to ZIP.

Using a version prior to 9?

If you’re looking for instructions to convert JDK’s prior to 9, please visit the previous tutorial since the process differs in quite a few steps:

Pre-requisites

Download the JDK

Visit this link to download the appropriate JDK 9 for your Windows, accepting Oracle’s license agreement.

JDK 9 download page

Extract the JDK

Create a directory to work with (by example: C:\JDK). and copy the downloaded JDK to that directory;

Next, run 7-Zip, choose your JDK copy and click on Extract (Extrair):

7-ZIP extraction menu

Leave the settings as their default on the new window that has opened, then hit OK:

7-ZIP JDK 9 extraction settings

Wait until the process complete, you will end with a folder with the same name as the JDK file. Go into that folder and you should have a file named tools.zip inside of it:

JDK 9 resulting extraction

Extract its contents with 7-Zip to get a tools folder with the following contents:

tools.zip contents
cd C:\JDK\jdk-9_windows-x64_bin\tools for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"
Prompt to convert pack files into jar

You’re done, the content inside the tools folder is now your portable JDK.

If you also want to extract the src.zip of the JDK for e.g. using with your IDE, please refer to:

Hope it helps. Cya!

References

2 thoughts on “Convert JDK 9 from EXE to ZIP”

  1. Pingback: Convert JDK from EXE to ZIP - bgasparotto

Leave a Reply

Your email address will not be published. Required fields are marked *