Wednesday, February 24, 2016

Installing JDK without admin privileges


Download the JDK
ex: jdk-8u73-windows-x64.exe

Open the .exe file with 7-Zip. It contains a single file tools.zip, which contains all the files we need.
Extract the tools.zip to the desired JDK directory (e.g. “C:\Java\jdk1.8.0_73”).

Now we need to unpack a few files packed with pack200. We do that by executing this script in a console windows inside the JDK directory (e.g. “C:\Java\jdk1.8.0_73”):
1
for /R %f in (.\*.pack) do @"C:\Java\jdk1.8.0_73\bin\unpack200" -r -v -l "" "%f" "%~pf%~nf.jar"
Regard that you will have to adjust the path of the unpack200 binary (“C:\Java\jdk1.8.0_73\bin\unpack200”) to your chosen directory.

No comments:

Post a Comment