Install and Configure ThingWorx Navigate > Update ThingWorx Services to Use Java 11
Update ThingWorx Services to Use Java 11
If you are planning to upgrade to Java 11 after installing or upgrading to ThingWorx Navigate 9.1.0, perform the steps below.
Step 1: Update the ThingWorx-Foundation Service
The topic Using the ThingWorx Foundation Installer with Java 11 from the ThingWorx Help Center provides instructions for updating the ThingWorx-Foundation service.
Step 2: Update the ThingWorx-IntegrationRuntime Service
For updating the ThingWorx-IntegrationRuntime service, follow the steps below based on your operating system:
Windows 
Before You Begin
Before you begin, make sure the following is in place:
Java 11 is installed.
The /bin directory is set in the PATH system variable,
The JAVA_HOME environment variable is set to use the Java 11 installation directory.
The java.exe file is located under the Java 11 installation directory. For instance, C:\Program Files\Java\jdk-11.0.8\bin\java.exe.
The ThingWorx-Foundation service is updated to use Java 11. Refer to this topic for instructions.
Step 1: Determine the Java Version Used
Use the Process Explorer on your environment to determine which Java version is used by the nssm.exe process. You can download the Process Explorer from here.
1. Open a command prompt as administrator.
2. Open the Process Explorer from the command prompt. For example,
> C:\Users\Vagrant\Desktop\procexp64.exe
3. On the Process Explorer window, locate the nssm.exe process and double-click java.exe.
This opens a new properties window, which lists details about the java.exe used to run the nssm.exe process.
4. From the properties window, click the Image tab to identify the Java version used.
Java version
If Java 11 is used, you are good to go. There is no need to follow any additional steps. If any other version of Java is used, proceed with the next section, "Step 2: Update the ThingWorx-IntegrationRuntime Service".
Step 2: Update the ThingWorx-IntegrationRuntime Service
1. Stop the Thingworx-IntegrationRuntime service.
2. Open a command prompt as administrator.
3. Navigate to the third-party directory under the ThingWorx Integration Runtime installation directory. For example,
> cd C:\Program Files (x86)\ThingWorxIntegrationRuntime\third-party
4. Execute the following to edit the Thingworx-IntegrationRuntime service configuration:
> nssm.exe edit Thingworx-IntegrationRuntime
The Apache Tomcat Properties window opens.
5. Open the Application tab and edit the Path to use the java.exe for Java 11. For example, C:\Program Files\Java\jdk-11.0.8\bin\java.exe
6. Click Edit service to save your changes. A successful edit is notified through a popup window.
7. Start the Thingworx-IntegrationRuntime service.
8. Verify that log file created under the /IRLogs folder inside the ThingWorx Integration Runtime installation directory lists that the connection was established.
Example of log file location: C:\Program Files (x86)\ThingWorxIntegrationRuntime\IRLogs\IntegrationRuntime-012144ff23af.log
Example of log:
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - #########
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - Connection Established
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - #########
9. Post this update, you can verify the Java version using the Process Explorer. Detailed instructions are available in the section "Step 1: Determine the Java Version Used".
Linux 
Before You Begin
Before you begin, make sure the following is in place:
Java 11 is installed
You have copied the path of the Java 11 installation directory where the Java executable is located.
You can execute alternatives --display java | grep 'family java-11' | cut -d' ' -f1. The output should show the Java executable location, for example: /usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el8_2.x86_64/bin/java. Here, you copied /usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el8_2.x86_64, which is used to configure the ThingWorx-IntegrationRuntime service.
The ThingWorx-Foundation service is updated to use Java 11. Refer to this topic for instructions.
Update the ThingWorx-IntegrationRuntime Service
1. Stop the Thingworx-IntegrationRuntime service.
systemctl stop ThingWorx-Foundation.service
2. Back up the startup.sh script located under the/scripts folder in the ThingWorx Integration Runtime installation directory. For example:
/opt/ThingWorxIntegrationRuntime/scripts/startup.sh.backup
3. Edit the startup.sh script to point to the Java 11 installation directory copied in the "Before You Begin" section. In this example, the path was updated to JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el8_2.x86_64 from JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.265.b01-0.el8_2.x86_64/jre.
4. Execute the following command:
# systemctl daemon-reload
5. Start the Thingworx-IntegrationRuntime service:
systemctl start Thingworx-IntegrationRuntime
6. Verify that the Thingworx-IntegrationRuntime service is using Java 11:
# systemctl status Thingworx-IntegrationRuntime
Thingworx-IntegrationRuntime.service - Thingworx-IntegrationRuntime
Loaded: loaded (/etc/systemd/system/Thingworx-IntegrationRuntime.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-10-07 16:08:43 UTC; 4s ago
Process: 11310 ExecStop=/bin/bash /opt/ThingWorxIntegrationRuntime/scripts/shutdown.sh (code=exited, status=0/SUCCE>
Process: 11336 ExecStart=/bin/bash /opt/ThingWorxIntegrationRuntime/scripts/startup.sh (code=exited, status=0/SUCCE>
Main PID: 11337 (java)
Tasks: 31 (limit: 17467)
Memory: 166.2M
CGroup: /system.slice/Thingworx-IntegrationRuntime.service
└─11337 /usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el8_2.x86_64/bin/java -Dsecret.management.config.file=/op>

Oct 07 16:08:41 pg-foundation-rhel8.vagrantup.com systemd[1]: Starting Thingworx-IntegrationRuntime...
Oct 07 16:08:41 pg-foundation-rhel8.vagrantup.com bash[11336]: Starting Thingworx-IntegrationRuntime service ...
Oct 07 16:08:43 pg-foundation-rhel8.vagrantup.com bash[11336]: Thingworx-IntegrationRuntime service started
Oct 07 16:08:43 pg-foundation-rhel8.vagrantup.com systemd[1]: Started Thingworx-IntegrationRuntime.
7. Remove the backed up startup.sh.backup script.
8. Verify that log file created under the /IRLogs folder inside the ThingWorx Integration Runtime installation directory lists that the connection was established.
Example of log file location: /opt/ThingWorxIntegrationRuntime/IRLogs/IntegrationRuntime-a268-012144ff23af.log
Example of log:
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - #########
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - Connection Established
[vert.x-worker-thread-1] INFO c.t.i.ThingworxEdgeVerticle - #########
Was this helpful?