Skip to main content

Switching the JRE for Code Insight

The JRE required by Code Insight is automatically installed and configured as part of a fresh Code Insight installation. The version currently installed with Code Insight is Amazon Corretto OpenJDK JRE 17.0.16.8.1.

For various reasons, you might want to switch the JRE version currently used by your Code Insight installation. For example, during a Code Insight upgrade Code Insight, you might want to specify a JRE version different from the one already installed for your previous Code Insight system.

The following procedure describes how to configure Code Insight to use a different JRE version. Perform this procedure on the Code Insight Core Server and each Scan Server.

To install and configure a supported JRE version, do the following:

  1. Shut down Code Insight if it is currently running.

  2. In the Code Insight installation directory, delete the current jre folder.

  3. Download the new JRE to your machine.

    • From the Amazon website, download the amazon-corretto-17.0.16.8.1 JRE. For a Windows environment, download the appropriate JRE archive. For a Linux environment, download the appropriate JDK archive.
  4. Use the following instructions to Install and configure the JRE on the instance where Code Insight is installed:

    • On a Linux instance:

      1. Extract the downloaded archive.

      2. Copy the extracted jre folder to the Code Insight installation directory (for example,
        /home/qaadmin/codeinsight).

      3. Rename the folder to jre (if this is not already the name).

      • If you choose to use a name other than "jre", you must update the path for the JAVA_HOME and JRE_HOME variables in the catalina.sh file with the new folder name (as these variables automatically point to the jre folder after the Code Insight installation).
    • On a Windows instance:

      1. Extract the downloaded archive.

      2. Copy the extracted jre folder to the Code Insight installation directory (for example, C:\codeinsight).

      3. Rename the folder to jre (if this is not already the name).

        If you choose to use a name other than "jre", you must update the path for the JAVA_HOME and JRE_HOME variables in the <codeInsightInstallation>/tomcat/bin/catalina.bat file with the new folder name (as these variables automatically point to the jre folder after the Code Insight installation).

  5. If Code Insight is enabled for SSL, import the certificate into cacerts.

    note

    If your existing Code Insight instance is already configured with SSL and you prefer not to re-import all certificates into the new cacerts file, you can copy the existing cacerts file from the following location:

    <installLocation>/jre(OLD)/lib

    and replace the file in:

    <installation>/jre(NEW)/lib

    This approach helps retain all previously imported certificates without manual reconfiguration.

    See the appropriate sections instructions:

  6. Restart Tomcat (see Starting and Stopping Tomcat).