[JAVA] Install Corretto 8 on Windows

Install Corretto 8 on Windows

We may be migrating from the Oracle JDK to Amazon Corretto, so we will leave the steps for installing Corretto 8 on Windows 10. You can probably install it on Windows 7 with the same procedure.

For Mac, this article was helpful. [Java] Installing Amazon Corretto 8

What is Corretto?

A JDK implemented by Amazon (a kit of tools required for Java development). It has been endorsed by the Java community and is guaranteed to be compatible with Java SE (Java Standard Specification).

It can be used on Amazon Linux 2, Windows, and Mac, and the number of supported OS will increase in the future.

What is Corretto 8?

Amazon Corretto 8 is a JDK for Java 8. Free support is available until at least June 2023.

Download installer

You can download the Corretto 8 installer here.

https://docs.aws.amazon.com/ja_jp/corretto/latest/corretto-8-ug/downloads-list.html

image.png

My environment is Windows 64bit, so download ** amazon-corretto-8.202.08.2-windows-x64.msi **. For Windows 32bit, I think you can download it from the ** Windows x86 ** next door.

By the way, there is JRE, but the compiler is not included here. For development use, you need the JDK version. (The JRE version also includes the JVM and API)

Run the installer

Double-click the installer to launch the wizard. Follow the instructions on the screen.

Corretto01.PNG Corretto02.PNG Corretto03.PNG Corretto04.PNG Corretto05.PNG

Installation is complete when you reach this point.

If you keep the default, it will be installed in the following path.

C:\Program Files\Amazon Corretto\jdk1.8.0_202

Set environment variables

If the shell is a command prompt

First, check JAVA_HOME.

The above installation process should automatically add JAVA_HOME to your system environment variables. If you have used another JDK in the past and JAVA_HOME originally exists, the value will be overwritten.

Use the following command to check if the settings are correct.

echo %JAVA_HOME%

If you see C: \ Program Files \ Amazon Corretto \ jdk1.8.0_202, you are successful.

Then add the following to the beginning of the system environment variable Path:

%JAVA_HOME%\bin

If you have used another JDK in the past and have already added it, this step is not necessary.

If the shell is Git Bash

If you are using Git Bash as a shell as well as the command prompt, you need to set those environment variables manually, so I will write the procedure.

First, open % USERPROFILE% \ .bash_profile in a text editor. If not, I will make it.

Add the following after the last line and save. If there is already JAVA_HOME, rewrite the right side of=.

# Java
export JAVA_HOME='/c/Program Files/Amazon Corretto/jdk1.8.0_202'
export PATH=$PATH:${JAVA_HOME}/bin

Restart Git Bash and check if it is set correctly with the following command.

echo $JAVA_HOME

If you see / c / Program Files / Amazon Corretto / jdk1.8.0_202, you are successful.

Check Java version

Check the Java version at the command prompt (or Git Bash).

java -version

If the following is displayed, the installation is successful. Thank you for your support.

openjdk version "1.8.0_202"
OpenJDK Runtime Environment Corretto-8.202.08.2 (build 1.8.0_202-b08)
OpenJDK 64-Bit Server VM Corretto-8.202.08.2 (build 25.202-b08, mixed mode)

Switch to another JDK

You should be able to switch by simply changing the value of the system environment variable JAVA_HOME to the installation path of another JDK.

For example, if the Oracle JDK is installed in C: \ Program Files \ Java \ jdk1.8.0_172, you can specify that path in JAVA_HOME to enable the Oracle JDK instead of Corretto.

at the end

It was fairly easy to introduce. I checked the operation with an existing Java project, but there was no particular problem.

Recommended Posts

Install Corretto 8 on Windows
Install Docker on Windows 10 PRO
Error when npm install on Windows 7
Install Java with zip on Windows
How to install ImageMagick on Windows 10
Note Book: OpenBLAS Install On Windows10
Note Book: LAPACK Install On Windows 10
Note Book: VTK Install On Windows10
Install Java 9 on windows 10 and CentOS 7
Install gradle on mac
Install OpenJDK on macOS
Install Java on Mac
[Java] Install Amazon Corretto 8
Install Golang on CentOS 8
Install pyqt5 on ubuntu
Install Neo4j 4.1.3 on centOS
Install Docker on Manjaro
Install Vertica 10.0 on CentOS 6.10
Install Ruby on Ubuntu 20.04
Note Book: OpenCV with CUDA Install On Windows10
Install PostgreSQL 12 on Centos8
Install nginx on centOS7
Install lombok on SpringToolSuite4
Install Python 3 on CentOS 7
Install kuromoji on CentOS7
Install Autoware on Ubuntu 18.04.5
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
Install Liferay 7 / DXP (Windows)
Use Corretto 11 on Heroku
Install openjdk11 on mac
Install Homebrew on Ubuntu 20.04
M.S. docker on Windows
Install Redmine 4.1.1 on CentOS 7
Install OpenJDK 8 on mac
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
Install Java 8 (OpenJDK: Amazon Corretto) on macOS with Homebrew
Install Docker on Raspberry Pi
Install OpenJDK7 (JAVA) on ubuntu 14.04
Install Cybozu Office 10 on Ubuntu 20.4
Install Docker on Ubuntu Server 20.04
Ubuntu on Windows Community Preview
Install Sidekiq pro on Rails
Run openvpn on Docker (windows)
Try Docker on Windows 10 Home
Install rbenv on Amazon Linux
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
Manually build OpenJDK on Windows
Install tomcat on Sakura's VPS
Install OpenFOAM v2006 on CentOS
Install Arudino IDE on Ubuntu 20
Install Java on WSL Ubuntu 18.04
Install Jenkins on Docker's CentOS
Install Ubuntu Desktop 20.10 on RaspberryPi4
Install Apache on CentOS on VirtualBox
Install Arduino IDE on Ubuntu 20.04
Ubuntu on Windows build speed
Install Rails on macOS Catalina