Environment Setup on Windows#
1. Gitのインストール#
Go to the official Git for Windows website.
Click “Download” on the top page.
After the download finishes, run the installer.
Click “Next” for every step.
Wait until the installation is complete.
When the installation is complete, click “Finish”.
Type “Git Bash” in the search bar and launch Git Bash.
If the window appears, the installation was successful.
2. Pythonのインストール#
Go to the official Python website.
Click “Download Python ~” on the top page.
After the download finishes, run the installer.
Make sure “Add python.exe to PATH” is checked, then click “Install Now”.
Wait until the installation is complete.
When the installation is complete, click “Close”.
Open Git Bash, type
python --version, and ifPython [version]is displayed, the installation was successful. (If it does not appear, restart Git Bash.)
3. OpenJDKのインストール#
Go to the OpenJDK download page.
Click “zip” next to Windows for 21.0.2.
Extract the downloaded zip file.
Confirm that extraction creates a folder such as “jdk-21.0.2”.
Move this folder, “jdk-21.0.2”, directly under
C:\.Run Command Prompt as an administrator on Windows.
After opening it, run the following command.
powershell -command "[System.Environment]::SetEnvironmentVariable(\"JAVA_HOME\", \"c:\jdk-21.0.2\", \"Machine\")"
Next, run the following command.
powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";c:\jdk-21.0.2\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")"
Open Git Bash and type
java -version. If text like the following is displayed, the installation was successful.openjdk version "21.0.2" 2022-01-18 OpenJDK Runtime Environment (build 21.0.2) OpenJDK 64-Bit Server VM (build 21.0.2, mixed mode, sharing)
openjdk version "21.0.2" 2022-01-18 OpenJDK Runtime Environment (build 21.0.2) OpenJDK 64-Bit Server VM (build 21.0.2, mixed mode, sharing)