Windows version of OpenJDK installation procedure
For the Amazon Corretto installation procedure, refer to Amazon Corretto installation procedure for Windows --Qiita.
How to find out
- openjdk - Google Search
-[windows life cycle site: microsoft.com --Google search](https://www.google.com/search?q=windows+%E3%83%A9%E3%82%A4%E3%83%95%E3 % 82% B5% E3% 82% A4% E3% 82% AF% E3% 83% AB + site% 3Amicrosoft.com)
-[Explorer Address Bar-Google Search](https://www.google.com/search?q=%E3%82%A8%E3%82%AF%E3%82%B9%E3%83%97%E3 % 83% AD% E3% 83% BC% E3% 83% A9% E3% 83% BC +% E3% 82% A2% E3% 83% 89% E3% 83% AC% E3% 82% B9% E3% 83 % 90% E3% 83% BC & tbm = isch)
Premise
--Supported Windows.
--OpenJDK 10 was distributed in .tar.gz format, so the tar command was needed,
Since OpenJDK 11 and later are distributed in zip format, it is no longer necessary to be the latest.
Remarks
--If you download and unpack the new version of OpenJDK, just change the variable value of ** JAVA_HOME **.
--Leave Path as % JAVA_HOME% \ bin
.
Installation procedure
- Go to jdk.java.net and download the Windows version of the zip file.
- Click the link that says * Ready for use: *.
--This time, it is assumed that you clicked ** JDK 13 **.
- Click ** zip ** on * Windows / x64 * to download.
- Right-click the downloaded file and click ** Extract All *.
- Compressed (ZIP format) Folder extraction * A window opens.
- In the * Extract files to the folder below *, enter
C: \
and press the ** Extract ** button.
--In the above, depending on the OS and browser, a backslash may be displayed after the colon (:
), but for Japanese keyboards, a backslash is OK.
--A folder called jdk-13.0.1
is expanded directly under the C drive.
- Delete the downloaded file.
- Move to the extracted folder and copy the path from the address bar.
--The path this time is
C: \ jdk-13.0.1
.
- Open ** Start-Settings *.
- Windows Settings * window is displayed.
- Enter
environment variable
in the search window.
-* Edit environment variables * and * Edit system environment variables * are displayed as candidates.
- Click ** Edit Environment Variables *.
- Environment Variables * window is displayed.
- Click the ** New ** button of * User environment variable .
- New user variable * window is displayed.
- Enter the following and press the ** OK ** button.
--Variable name: ** JAVA_HOME **
--Variable value: (Paste the path you copied earlier.)
--In this case, you will paste
C: \ jdk-13.0.1
.
- In the * Environment Variables * window, click ** Path ** of * User Variables * and press the ** Edit ** button.
-* Edit environment variable name * window is displayed.
- Press the ** New ** button, enter
% JAVA_HOME% \ bin
, and press the ** OK ** button.
-* Environment Variables * Return to the window.
- Just press the ** OK ** button.
-* Windows Settings * You can close the window.
- Open a command prompt and check that the
java
and javac
commands are available.
```shell
openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment (build 13.0.1+9)
OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
```
```shell
javac 13.0.1
```
Don't miss it.