Steps
- Download JDK from Oracle
- Download and Install 7-zip from here
- Open installition exe using 7-Zip
- Extract the tools.zip
- Extract the content of tools.zip to a folder (e.g. c:\jdk).
- Open the extracted folder in cmd prompt.
- Execute
for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"
command - Set
JAVA_HOME
to the jdk (e.g c:\jdk) folder. - Add
%JAVA_HOME%/bin
to the PATH env variable.
Testing
Run the following command to check the installation, it will print the version of JDK.
c:> javac -version
javac 1.7.0_51
NOTE: Tested with JDK 1.7 and 1.8
Update 1
Edited the answer to add the steps in the answer itself instead of the link to a blog post.
Update 2
For 64-Bit please check unpack-jdk-x64.bat by grabantot