Install portable JDK on Windows without admin rights

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

iron-java-mug_120x120

  1. Install Portable 7zip
  2. Download Oracle JDK installer for Windows (*.exe)
  3. Run 7-ZipPortable.exe from your Portable 7zip
  4. In 7zip find and right-click the jdk installer exe file
  5. From the context menu use 7-Zip – Open Archive and then Extract
  6. Now extract the resulting “tools.zip” to a folder that is writable for you
  7. 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!

10 thoughts on “Install portable JDK on Windows without admin rights

  1. Hi can u pls do a video demonstration on this ! I am unable to install java without admin rights

    1. 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.

  2. 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!

    1. 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.

  3. 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”

  4. 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.

  5. 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

Leave a comment