Java 17.x on Amazon Linux
Last updated
Was this helpful?
This article provides step-by-step instructions for installing Java 17.x on an Amazon Linux 2023 system. Java is a critical component for running enterprise applications, middleware, and development tools. This guide ensures a clean, secure, and verified installation, suitable for production or development environments.
Ensure the following conditions are met before starting the installation:
A running Amazon Linux 2023 virtual machine (EC2 or on-prem).
A user account with sudo privileges.
An active internet connection is required to download packages from the repository.
Update the System Package Index
Update the package manager to ensure that all existing packages and repository metadata are up to date.
sudo yum update -ySample Reference Screenshot:

This step is essential to prevent conflicts or missing dependencies during Java installation.
Install Java 17 (Amazon Corretto)
Use the following command to install Amazon Corretto 17, a free, multiplatform, production-ready distribution of the Open Java Development Kit (OpenJDK).
sudo yum install -y java-17-amazon-correttoSample Reference Screenshot:

Verify the Installation
After the installation completes, verify that Java 17 is installed and accessible from the command line:
java --versionSample Reference Screenshot:

Expected Output Example:
openjdk 17.0.x 202x-xx-xx LTS
OpenJDK Runtime Environment Corretto-17.x.x.x (build 17.0.x+xx)
OpenJDK 64-Bit Server VM Corretto-17.x.x.x (build 17.0.x+xx, mixed mode)If the version output is displayed successfully, the Java installation is complete.
Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.
Last updated
Was this helpful?
Was this helpful?

