How To Install java-11-amazon-corretto.x86_64 on Amazon Linux 2

In this tutorial we learn how to install java-11-amazon-corretto.x86_64 in Amazon Linux 2. java-11-amazon-corretto.x86_64 is Amazon Corretto development environment

Introduction

In this tutorial we learn how to install java-11-amazon-corretto.x86_64 on Amazon Linux 2.

What is java-11-amazon-corretto.x86_64

Amazon Corretto’s packaging of the runtime core elements of the OpenJDK 11 code.

We can use yum to install java-11-amazon-corretto.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install java-11-amazon-corretto.x86_64.

Install java-11-amazon-corretto.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install java-11-amazon-corretto.x86_64 using yum by running the following command:

sudo yum -y install java-11-amazon-corretto.x86_64

How To Uninstall java-11-amazon-corretto.x86_64 on Amazon Linux 2

To uninstall only the java-11-amazon-corretto.x86_64 package we can use the following command:

sudo yum remove java-11-amazon-corretto.x86_64

java-11-amazon-corretto.x86_64 Package Contents on Amazon Linux 2

/usr/lib/jvm/java-11-amazon-corretto.x86_64/include/jawt.h
/usr/lib/jvm/java-11-amazon-corretto.x86_64/include/linux/jawt_md.h
/usr/lib/jvm/java-11-amazon-corretto.x86_64/lib/libawt_xawt.so
/usr/lib/jvm/java-11-amazon-corretto.x86_64/lib/libjawt.so
/usr/lib/jvm/java-11-amazon-corretto.x86_64/lib/libsplashscreen.so

References

Summary

In this tutorial we learn how to install java-11-amazon-corretto.x86_64 on Amazon Linux 2 using yum.