Set Amazon Corretto 8 as the default Java environment

Use Amazon Corretto 8 as the default JDK for VIS.

Amazon Corretto 8 is a production-ready version of Java that comes with free, long-term support. It is fully compatible with the Java SE standard, ensuring reliability and security.

This guide contains instructions for installing and configuring Coretto 8 on CentOS/RHEL Linux distributions and Windows Server.

Note: After performing the steps in this guide, it is safe to remove any prior version of openJDK on the server that is not being used by other applications or services.

CentOS/RHEL

Follow the steps below to install Amazon Corretto 8 and set it as the default Java environment on a Linux OS:

  1. Import the Corretto signing key:

    sudo rpm --import https://yum.corretto.aws/corretto.key
  2. Add the Corretto repository:

    sudo curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo|https://yum.corretto.aws/corretto.repo
  3. Install the Corretto 8 JDK:

    sudo yum install java-1.8.0-amazon-corretto-devel-1.8.0_462.b08-1.x86_64
  4. Configue the Java environment:

    sudo alternatives --config java

    Select "coretto" when prompted.

  5. Verify Corretto 8:

    which java
    

    The which java command should return /usr/bin/java.

    java -version

    The java -version command should show Coretto.

  6. Restart Tomcat:

    sudo systemctl restart tomcat
  7. Verify Tomcat:

    grep "Java Home" catalina.out

    You should see output similar to the following:

    2025-10-13 13:20:28,980 [main] INFO  org.apache.catalina.startup.VersionLoggerListener- Java Home: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre

Windows Server

Follow the steps below to install Amazon Corretto 8 and set it as the default Java environment on a Windows OS:

  1. Download the Windows 64-bit JDK.msi file.

  2. Run the MSI file to install Coretto 8.

  3. Set the JAVA_HOME system variable to <install path>\jdk1.8.0_462\bin:

    setx JAVA_HOME "<install path>\jdk1.8.0_462" /M
  4. Open the Configure Tomcat application and set the Tomcat JRE to point to the Corretto JRE (<install path>\jdk1.8.0_462\jre\bin\server\jvm.dll), as shown below:

    example tomcat properties
  5. Restart Tomcat to complete the process.