0% found this document useful (0 votes)
255 views10 pages

01 Amazon Corretto 17 (Java) Install Guide

The document provides instructions for installing Amazon Corretto Java on Windows. It describes downloading the installer, running through the installation process, and verifying the installation. It also includes optional steps for configuring environment variables if needed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
255 views10 pages

01 Amazon Corretto 17 (Java) Install Guide

The document provides instructions for installing Amazon Corretto Java on Windows. It describes downloading the installer, running through the installation process, and verifying the installation. It also includes optional steps for configuring environment variables if needed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

CST8116 Introduction to Computer Programming

Installing Amazon Corretto (Java Installation)

Overview
Amazon Corretto is an open-source distribution of the Java Platform (OpenJDK) which will be used in our course.
i.e. Amazon Corretto is a flavor of OpenJDK provided by Amazon Corporation.

Download Java Installer


Download the installation file here:
https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/downloads-list.html

(Screen Shot taken from the Amazon Corretto downloads list web site)

For windows, use the Windows x64 JDK link ending in .msi
Direct Download Link: https://corretto.aws/downloads/latest/amazon-corretto-17-x64-windows-jdk.msi

Double click downloaded file:


amazon-corretto-17.0.3.6.1-windows-x64.msi
(The version number on the web page when you visit might be newer, this is okay)

Installation Guide
Double-click on the downloaded file to run it.

(Images and company logos as presented in this handout are copywrite / trademark their respective owners.)
Click Next

Click Browse and change the default path (C:\Program Files\Amazon Corretto\) to:
C:\AmazonCorretto
Note: Remove the space character between Amazon and Corretto

Change To: C:\AmazonCorretto\

Write down the installation path you used, if different from the recommended one used here, you may need your path
information later when configuring or troubleshooting system environment variables. (A path starts with a letter like C:
and includes a list of folders separated by backslashes)
Click OK
Note:
The installer will configure the operating system environment variables JAVA_HOME and PATH.
(Optionally you can expand the [+] next to the Setup Environment for more information, but this is not required. If you
do take a look, do not change any settings.)

Instructions on how to manually configure system environment variables can be found at the bottom of this handout.
Click Next

Click Install

You may be asked if you want to give permission for Amazon Corretto to install, grant permission to do so.
A new window will open with a progress bar; wait until the installation is complete

Click Finish

Verifying the Installation of Java (Amazon Corretto)


Open a Command Prompt window (Windows Button, type cmd, hit enter)

Enter these two commands to verify both the Java Runtime Environment (java), and the Java Compiler (javac) are
responding:

C:\WINDOWS\system32>cd \

C:\>java -version
openjdk version "17.0.3" 2022-04-19 LTS
OpenJDK Runtime Environment Corretto-17.0.3.6.1 (build 17.0.3+6-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.3.6.1 (build 17.0.3+6-LTS, mixed mode, sharing)

C:\>javac -version
javac 17.0.3

C:\>

(The version number you have will be newer, as of June 21, 2022 it is 17.0.3, as long as the first number is 17 it is okay).

Editing Path / Verifying Path – Optional or Troubleshooting


Click on the Start Button, type Control Panel, open the Control Panel.

In the upper right corner, change the View-By: dropdown to either Large or Small Icons
Double click on the System Icon

Scroll down to locate the Advanced System settings menu and click.
Select Environment Variables… (Some parts of the system environment variables blurred to protect privacy)

Depending on the software already installed in your system, you will not see the exact items above.

If you have JAVA_HOME, and the Path starts with C:\AmazonCorretto\jdk17.0.3_6\bin; (or a newer version number)
then you are ready to use Java.
If you do not have an entry for JAVA_HOME, or C:\AmazonCorretto\jdk17.0.3_6\bin; in the path then:

Make changes in the System variables portion of the screen, not the User variables

Caution: Do not delete the Path variable either by using Delete, or accidentally while editing it. If in doubt use Cancel
and get help from your lab professor.

If you do not see an entry for JAVA_HOME, use the lower New… button

Enter JAVA_HOME for the Variable Name, and the location of the jdk (Java Development Kit) folder on your hard drive.

Start with windows explorer then copy and paste the path. Tip: Click the address and you can get the path in a format
you can copy.

Example:
Variable name: JAVA_HOME
Variable value: C:\AmazonCorretto\jdk17.0.3_6

Use the folder name that matches your installed version of Amazon Corretto 17.
Click OK

In the System variables section, select Path.


Verify that the Path statement starts with either / or
%JAVA_HOME%\bin; OR C:\AmazonCorretto\jdk17.0.3_6\bin;

Note that there is a semi-colon at the end of the text above in either case.

In my screen shot the installer added C:\AmazonCorretto\jdk17.0.3_6\bin; as the first part of the path.

Alternatively, you can use %JAVA_HOME%\bin; the %JAVA_HOME% causes windows to look up the value within
JAVA_HOME and place it into the path as needed, i.e. the path will still start with the value inside JAVA_HOME.

In the past, JAVA_HOME was easier to edit as newer versions of Java were installed on the computer, without taking the
risk of editing the Path variable itself.

On an aside, the \bin is a sub-folder that contains all of the binary files i.e. the utility programs for Java like java and
javac (java.exe and javac.exe).

I then clicked OK.

Note: Older versions of Windows only have a single text-box with a very long Path value. Do not delete it all by
accident, edit very carefully using the left and right arrow keys on your keyboard.
With the Path corrected, click OK.

Test (again) to ensure that java and javac work if you made changes.

Note: Close and re-open any Command Prompt windows, they only read the Path environment variable once when they
open. Older Command Prompt windows will not know if the Path was changed.

Tip: Additional Troubleshooting information can be obtained from the console using
echo %JAVA_HOME%
echo %path%
the percent signs are required.

The echo %Path% should report the correct location of the bin folder as the first entry in the Path itself.

My JAVA_HOME was reported as:


C:\AmazonCorretto\jdk17.0.3_6

My path value is very long, however the start of it looks like:


C:\AmazonCorretto\jdk17.0.3_6\bin;

Note: If you make changes to the JAVA_HOME and / or Path environment variables, you will need to close and then re-
open the console to check the environment variables again.

You might also like