Monday, March 24, 2014

Install Java JDK on Windows using Non-Administrative User credentials

1. Download Java JDK e.g. jdk-7u55-windows-i586.exe
2. Extract downloaded .exe file using 7-zip
3. A tools.zip will be extracted and extract again using 7-zip
4. Open Command Prompt and locate the directory of the extracted file
5. From there executive the following command:
for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"
6. Copy whole directory and all subdir of the extracted files e.g. c:\JDK
7. Setup JAVA environment via either of the following:
  • Right click My Computer -> Properties -> Advanced System settings -> Advanced -> Environment Variables. Add JAVA_HOME = c:\JDK. Add to Path = %JAVA_HOME%\bin
  • Create .bat file with following contents and execute when needed:
    • JAVA_HOME=C:\JDK
    • PATH=%PATH%;%JAVA_HOME%\bin

No comments: