Home > dev-tools, java, windows > Install portable JDK on Windows without admin rights

Install portable JDK on Windows without admin rights

September 15, 2016 Leave a comment Go to comments

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!

Advertisements
Categories: dev-tools, java, windows Tags: , ,
  1. Alex
    February 10, 2019 at 20:29

    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!

    • February 11, 2019 at 08:31

      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.

  2. Frank Schulte
    December 6, 2018 at 06:58

    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”

  3. Frank Schulte
    December 6, 2018 at 06:29

    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.

  4. Frank Schulte
    December 6, 2018 at 06:28

    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

  1. No trackbacks yet.

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

%d bloggers like this: