You can extract the JDK folder from the installation EXE.
Check out this link for steps. The message was for JDK 1.7, it will work for JDK 1.8 as well
Do the following.
Steps
- Download JDK from Oracle
- Download and install 7-zip from here
- Open exe exe version with 7-Zip
- Extract tools.zip
- Extract the contents of tools.zip to a folder (e.g. c: \ jdk).
- Open the extracted folder at the cmd command prompt.
- Run the command
for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"
- Install
JAVA_HOME
in the jdk folder (e.g. c: \ jdk). - Add
%JAVA_HOME%/bin
to the env PATH variable.
Testing
Run the following command to verify the installation, it will print the JDK version.
c:> javac -version javac 1.7.0_51
NOTE. Tested with JDK 1.7 and 1.8
Update 1
Edited the response to add steps to the response itself, rather than a link to a blog post.
Update 2
For 64-bit code, please unpack-jdk-x64.bat grabantot
source share