Amazon Corretto
Corretto 8 User Guide

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

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

If you need to install Amazon Corretto 8 on Amazon Linux 2, see Installing on Amazon Linux 2.

Install Amazon Corretto 8 on Debian-Based Linux

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

Download and Install the Debian Package Manually

  1. Download the Linux .deb file from the Downloads page. Before you install the JDK, install the java-common package.

    sudo apt-get update && sudo apt-get install java-common
  2. Install the .deb file by using dpkg --install. e.g. install x86_64 deb using the following command:

    sudo dpkg --install java-1.8.0-amazon-corretto-jdk_8.212.04-2_amd64.deb

Verify Your Installation

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

java -version

For example, expected output for Corretto-8.212.04.3:

openjdk version "1.8.0_212" OpenJDK Runtime Environment Corretto-8.212.04.3 (build 1.8.0_212-b04) OpenJDK 64-Bit Server VM Corretto-8.212.04.3 (build 25.212-b04, 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 8

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

Uninstall JDK:

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

Install Amazon Corretto 8 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. e.g. install x86_64 rpm using the following command:

    sudo yum localinstall java-1.8.0-amazon-corretto-devel-1.8.0_212.b04-2.x86_64.rpm

Verify Your Installation

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

java -version

For example, expected output for Corretto-8.212.04.3:

openjdk version "1.8.0_212" OpenJDK Runtime Environment Corretto-8.212.04.3 (build 1.8.0_212-b04) OpenJDK 64-Bit Server VM Corretto-8.212.04.3 (build 25.212-b04, 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 8

You can uninstall Amazon Corretto 8 by using the following

Uninstall JDK:

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