I found the basic idea here, the exact steps are:

- Install Portable 7zip
- Download Oracle JDK installer for Windows (*.exe)
- Run 7-ZipPortable.exe from your Portable 7zip
- In 7zip find and right-click the jdk installer exe file
- From the context menu use 7-Zip – Open Archive and then Extract
- Now extract the resulting “tools.zip” to a folder that is writable for you
- Open a cmd.exe, cd into the folder and execute this:
for /R %f in (.\*.pack) do @"%cd%\bin\unpack200" -r -v -l "" "%f" "%~pf%~nf.jar"
Kudos to Nick Russler for figuring out this tricky unpack200 command line!
Hi can u pls do a video demonstration on this ! I am unable to install java without admin rights
Hi and sorry for the late response. My instructions from 2016 were about the Oracle JDK, which they didn’t make available as simple zip archive. Nowadays you can just go to https://adoptium.net/releases.html and download the latest LTS release zip for Windows.
should i paste that command in an batch file?
See what we already discussed above. You have to be in folder where you extracted tools.zip to. Use the cd command accordingly. Then you should be able to copy and paste that command line into your cmd.exe (text terminal window) and press enter.
Hi! I am sort of a noobie to computer stuff. I got to the last step, but couldn’t figure it out. Do I just directly copy and paste that specific command in? Do I have to alter it in any way?
Thanks for your help!
You have to be in folder where you extracted tools.zip to. Use the cd command accordingly. Then you should be able to copy and paste that command line into your cmd.exe and press enter.
Sorry to spam you. Find fixed line:
FOR /R %JAVA_HOME% %%F IN (*.pack) DO %JAVA_HOME%\bin\unpack200 -r -v -l “” “%%F” “%%~dF%%~pF%%~nF.jar”
I needed to do:
SET JAVA_HOME=C:\_env\Java\jdk-1.8.192
FOR /R %JAVA_HOME% %%F IN (*.pack) DO %JAVA_HOME%\bin\unpack200 -r -v -l “” “%%F” “%%~dF%%~pF.jar”
Please note the %% used in the Expansion part. If not like this the FOR command complains.
I needed to do:
SET JAVA_HOME=C:\_env\Java\jdk-1.8.192
FOR /R %JAVA_HOME% %%F IN (*.pack) DO %JAVA_HOME%\bin\unpack200 -r -v -l “” “%%F” “%%~dF%%~pF.jar”
Please note the %% used in the Expansion part for Variable F. If not like this the FOR command complains.
Cheers
Frank
Were you using those lines inside a *.bat script? Then you need the %%. I was running the for command directly on the command line and then you use just single %. Also see https://stackoverflow.com/questions/14509652/what-is-the-difference-between-and-in-a-cmd-file