Amazon Corretto
Corretto 11 User Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Amazon Corretto 11 Installation Instructions for Debian-Based and RPM-Based Linux Distributions

This topic describes how to install Amazon Corretto 11 on Debian-based and RPM-based Linux distributions.

Install Amazon Corretto 11 on Debian-Based Linux

This section describes how to install and uninstall Amazon Corretto 11 on a host or container running a Debian-based operating system.

Download and Install the Debian Package Manually

  1. Before you install the JDK, install the java-common package.

    sudo apt-get update && sudo apt-get install java-common
  2. Download the Linux .deb file from the Downloads page.

  3. Install the .deb file by using sudo dpkg --install.

    sudo dpkg --install

Verify Your Installation

In the terminal, run the following command to verify the installation.

java -version

Expected output for 11.0.4:

openjdk version "11.0.4" 2019-07-16 LTS OpenJDK Runtime Environment Corretto-11.0.4.11.1 (build 11.0.4+11-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.4.11.1 (build 11.0.4+11-LTS, mixed mode)

If you see a version string that doesn't mention Corretto, run the following command to change the default java or javac providers.

sudo update-alternatives --config java

If you're using the JDK, you should also run the following.

sudo update-alternatives --config javac

Uninstall Amazon Corretto 11

You can uninstall Amazon Corretto 11 by using the following command.

sudo dpkg --remove java-11-amazon-corretto-jdk

Install Amazon Corretto 11 on RPM-Based Linux

Download and install RPM package manually

  1. Download the Linux .rpm file from the Downloads page.

  2. Install the downloaded .rpm file using yum localinstall.

    sudo yum localinstall

Verify Your Installation

In the terminal, run the following command to verify the installation.

java -version

This is the expected output for 11.0.4:

openjdk version "11.0.4" 2019-07-16 LTS OpenJDK Runtime Environment Corretto-11.0.4.11.1 (build 11.0.4+11-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.4.11.1 (build 11.0.4+11-LTS, mixed mode)

If you see a version string that doesn't mention Corretto, run the following command to change the default java or javac providers.

sudo alternatives --config java

If you're using the JDK, you should also run the following.

sudo alternatives --config javac

Uninstall Amazon Corretto 11

You can uninstall Amazon Corretto 11 by using the following

sudo yum remove java-11-amazon-corretto-devel