Spotfire® Server and Environment - Installation and Administration

Switching to another Java Development Kit for the Spotfire Server

If you want to use a different Java Development Kit than the one included with the installation, you must upgrade the server to the newer Java version manually, whenever it is released. If you run the Spotfire Server as a Windows Service, this procedure must also be repeated when the server is upgraded.

About this task

See the Spotfire Server system requirements for information on which JDK distributions that are supported.

You can perform this upgrade with minimal impact on the Spotfire system, however, you must restart each Spotfire Server at least once. Follow the process outlined below for each Spotfire Server in your environment.

Note: Before upgrading the Java Development Kit, perform a full backup of the Spotfire Server. See the Backup of Spotfire Server section for more information.

Before you begin

A supported Java Development Kit (JDK), suitable for your operating system, must be installed. It is only supported to change to another JDK of the same major version as the one bundled with the product. It is not supported to downgrade to an older Java version (major or minor) than the one bundled with the Spotfire Server, unless Spotfire Support specifically clears you to do so.

Switch to another Java Development Kit

Procedure

  1. Stop the Spotfire Spotfire Server.
  2. Uncomment and specify the variable SPOTFIRE_JAVA_HOME in the file <installation directory>\tomcat\spotfire-bin\setspotfireenv.bat (Windows) or <installation directory>/tomcat/spotfire-bin/setspotfireenv.sh (Linux) pointing to the JDK installation that you want to use (for example, C:\Program Files\Java\jdk-17, or to the existing JAVA_HOME environment variable if there is one).
    Optionally, if you run on Windows, you can set an environment variable called SPOTFIRE_JAVA_HOME instead.
  3. If you are running the Spotfire Server as a Windows Service, then reinstall it by running the following commands:
    <installation directory>\tomcat\bin\service.bat remove
    <installation directory>\tomcat\bin\service.bat install
  4. Start the Spotfire Spotfire Server.
    The Java Development Kit has now been updated.
    Note: If you run the Spotfire Server as a Windows Service, then this procedure must be repeated when the server is upgraded because the service installer is not aware of the Spotfire environmental variables.
  5. Optional: If you determine that the original Java Development Kit is not needed, it is possible to remove it by deleting the directory <installation directory>/jdk. However, keeping it installed should not cause any problems and makes reverting easier.
    Important: If you remove the old Java Development Kit, you cannot revert the Java changes without restoring from a backup.

Revert to the original Java Development Kit

About this task

If you should need to switch back to the bundled Java Development Kit, it is easy to do so, assuming that you have not removed it.

Procedure

  1. Stop the Spotfire Spotfire Server.
  2. Undo the changes made to the file <installation directory>\tomcat\spotfire-bin\setspotfireenv.bat (Windows) or <installation directory>/tomcat/spotfire-bin/setspotfireenv.sh (Linux), by commenting out, or removing, the SPOTFIRE_JAVA_HOME variable. Clear the SPOTFIRE_JAVA_HOME environment variable if it has been set.
  3. If you are running the Spotfire Server as a Windows Service then reinstall it by running the following commands:
    <installation directory>\tomcat\bin\service.bat remove
    <installation directory>\tomcat\bin\service.bat install
  4. Start the Spotfire Spotfire Server.
    The Spotfire Spotfire Server will use the original Java Development Kit.