Upgrade from Java 11 to Java 21

Prev Next

This guide describes the process of upgrading from OpenJDK 11 to OpenJDK 21. OpenJDK 21 is the recommended runtime environment starting with Release 26.3 and is mandatory starting with Release 26.4; for details on supported versions, see the Java upgrade overview. Lobster and many of our customers use the Adoptium (Eclipse Temurin®) JDK 21-LTS.

We recommend that you do not install OpenJDK using the Windows installer or your operating system's package manager, but instead unzip the ZIP or tarball archive (e.g., from Adoptium) into a separate directory. Reasons:

  • Decoupled from automatic OS updates – An operating system or package manager update cannot change the JDK version without your knowledge.

  • Controlled Upgrade – Every JDK upgrade is carried out deliberately. You can test it in the staging environment beforehand.

  • Quick Rollback – If a new version of Java isn't working, change the path back to the previously extracted JDK in the Lobster startup scripts or in platform.json and restart.

Which JDK is active is determined by JAVA_HOME or PATH — in Step 2, you set both to point to the extracted directory. A system-wide installation using the OS installer is not necessary; simply pointing to the extracted JDK directory is sufficient.

Step by step: How to perform an upgrade

  1. Unpacking JDK 21: Unpack the JDK 21 archive into a separate directory (e.g., C:\java\jdk-21.x.x or /opt/java/jdk-21.x.x) alongside the existing JDK 11. The existing JDK 11 remains available as a rollback option.

  2. JAVA_HOME and PATH should be updated to point to the new directory.

  3. Start the application in test mode and watch for encoding issues and TLS errors.

  4. Uninstall JDK 11 only once everything is running smoothly.

NOTE:

When you run the application for the first time under Java 21, the following message appears in logs/wrapper.log: *** INFO: SecurityManager could not be installed ***. This is expected behavior – see Java upgrade overview for details.