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 8u412-b08. Code Insight also officially supports Oracle JRE 8u411 and below.

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.

note

An Oracle JRE version greater than 8u202 requires a subscription before you can download its installation package.

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. Use the appropriate step:
    • From the Amazon website, download the amazon-corretto-8.412.08.1 JRE. For a Windows environment, download the appropriate JRE archive. For a Linux environment, download the appropriate JDK archive.

    • From the Oracle website, download the JRE associated with Java 8u411 (or another version supported by Code Insight) for the Windows or Linux environment.

  4. Use the following instructions to Install and configure the JRE on the instance where Code Insight is installed: On a Linux instance:
  5. Extract the downloaded archive.
  6. Copy the extracted jre folder to the Code Insight installation directory (for example,
    /home/qaadmin/codeinsight).
  7. 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:

  8. Extract the downloaded archive.
  9. Copy the extracted jre folder to the Code Insight installation directory (for example, C:\codeinsight).
  10. 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).
  11. If Code Insight is enabled for SSL, import the certificate into cacerts. See the appropriate sections instructions:
  12. Restart Tomcat (see Starting and Stopping Tomcat).