We will introduce how to install (use) the JDK on Windows without using the JDK (Java SE Development Kit) installer (exe file).
OS: Windows10 64-bit JDK:Java SE Development Kit 8u121
-Easy switching when developing using multiple JDKs. -You do not have to receive notifications prompting you to upgrade Java.
Download the JDK for Windows from the Oracle site normally. This time, I downloaded "jdk-8u121-windows-x64.exe" according to the environment.
Rename the file to change the file extension ".exe" to ".zip".
Since the decompression function installed in Windows cannot be decompressed well, prepare zip decompression software. This time, I used "7Zip". Click here for the source → https://sevenzip.osdn.jp/
Save the file unzipped with 7Zip to a location of your choice. A warning such as "The file cannot be opened as a [zip] archive" is displayed, but don't worry.
_ * 1: If "tools.zip" exists in the unzipped folder, this work is not necessary. When I tried it with "jdk-7u51-windows-i586.exe", "tools.zip" was completed when it was unzipped. It seems that it depends on the version of JDK. _
Run the following command:
cd [Unzipped folder path]\.rsrc\1033\JAVA_CAB10
extrac32 111
Unzip "tools.zip" in the "[Unzipped folder path] \ .rsrc \ 1033 \ JAVA_CAB10" folder, and execute the following command to convert the .pack file to a .jar file.
cd [Unzipped folder path]\.rsrc\1033\JAVA_CAB10\tools
for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar"
Move the files and folders in the tools folder to any location you like. In this example, it is "C: \ Java \ jdk-8u121". ↓ It looks like this.
↓ Add JAVA_HOME as an environment variable.
↓ Add JAVA_HOME to Path.
↓ Check the version with the "java -version" command.
that's all.
Recommended Posts