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.
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:
- Shut down Code Insight if it is currently running.
- In the Code Insight installation directory, delete the current
jrefolder. - 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.
-
- Use the following instructions to Install and configure the JRE on the instance where Code Insight is installed: On a Linux instance:
- Extract the downloaded archive.
- Copy the extracted
jrefolder to the Code Insight installation directory (for example,/home/qaadmin/codeinsight). - 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.shfile with the new folder name (as these variables automatically point to thejrefolder after the Code Insight installation). -
On a Windows instance:
-
- Extract the downloaded archive.
- Copy the extracted
jrefolder to the Code Insight installation directory (for example,C:\codeinsight). - 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 thejrefolder after the Code Insight installation). - If Code Insight is enabled for SSL, import the certificate into cacerts. See the appropriate sections instructions:
-
If Code Insight is enabled for SSL, see Enabling Secure HTTP Over SSL.
-
If Code Insight is set up for SSL communications with a MySQL instance, see Special Post-Installation Step: Configuring the MySQL SSL Option in Code Insight.
-
If HTTPS is supported for communications between Code Insight and TFS, see TFS Protocol and Credentials Configuration.
-
- Restart Tomcat (see Starting and Stopping Tomcat).