Java 17.x Upgrade (Windows)
Upgrading the Java Development Kit (JDK) is critical for maintaining security, performance, and compatibility with modern Java applications. This document provides step-by-step instructions for upgrading Java to JDK 17.0.15+6 on a Windows machine, reconfiguring environment variables, and reintegrating the JDK with an existing Apache Tomcat service.
Prerequisites
Before starting the upgrade, ensure the following:
Administrator access to the Windows machine.
Backup of current Tomcat configuration, including Java Options and Heap Size.
Tomcat service is stopped before upgrade.
Internet access available to download the JDK installer.
Upgrade Process Steps
Stop and Backup Tomcat Configuration
Open Services → Locate the Tomcat service → Right-click → Stop.
Navigate to the Tomcat
bindirectory.Open Command Prompt in that directory and run:
tomcat10w.exe //ES//<TomcatServiceName>Sample Reference Screenshot:
(Replace
<TomcatServiceName>with your actual Tomcat service name).In the Java tab, note down:
Java Options
Heap Size values (Copy to a Notepad for later reference).
Uninstall the existing Tomcat service:
service.bat remove <TomcatServiceName>Sample Reference Screenshot:
Uninstall Previous JDK Version
Open Control Panel → Programs → Programs and Features.
Locate the existing Java/JDK installation.
Right-click → Uninstall.
Download and Install JDK 17.0.15+6
Download the installer: OpenLogic JDK 17.0.15+6 MSI (Windows x64)
Run the .msi installer.
Follow the setup wizard to complete the installation.
Set Environment Variables
Press Windows Key → Search for Environment Variables → Open Edit the system environment variables.
Click Environment Variables.
Under System Variables → New:
Variable Name:
JAVA_HOMEVariable Value:
C:\Program Files\OpenLogic\jdk-17.0.15.6-hotspot
Under System Variables → Path → Edit: Ensure the following entry exists:
C:\Program Files\OpenLogic\jdk-17.0.15.6-hotspot\bin
Verify Java Installation
Open Command Prompt and run:
java -versionExpected output:
openjdk version "17.0.15" 2024-04-16 OpenLogic OpenJDK Runtime Environment ...Sample Reference Screenshot:
Reconfigure Tomcat Service
Navigate to Tomcat’s
bindirectory:cd C:\ovaledge\apache-tomcat-10.1.40\binReinstall the Tomcat service:
service.bat install <TomcatServiceName>Open Tomcat configuration:
tomcat10w.exe //ES//<TomcatServiceName>Sample Reference Screenshot:
Under the Java tab:
Restore previously saved Java Options and Heap Size.
Update paths if necessary (e.g., externalized
log4j.properties).
Under the General tab:
Set Startup Type → Automatic (Delayed Start).
Return to Services → Locate Tomcat service → Start.
Validation
After Tomcat is started:
Review catalina.out or stdout/stderr logs for errors.
Confirm application accessibility through the web interface.
Verify environment variables:
echo %JAVA_HOME%Ensure it points to the new JDK directory.
Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.
Last updated
Was this helpful?

