Crownpeak employee
Crownpeak employee

FAQ: Upgrade from Java 11 to 17

Why is it necessary to update the Java version? 

Java 17 has been released in September 2021, three years after Java 11. Two years later, in September 2023, the active support provided by Oracle is going to end. Additionally, support for Spring Boot 2.x will end in November 2023 and Spring Boot 3 requires Java 17. 

What is the recommended Java version for FirstSpirit? 

Starting with FirstSpirit 2023.1, the recommended Java version is Java 17. 

Do we have to compile our modules with Java 17? 

Java 17 is mostly backwards-compatible with older Java versions, so existing modules will continue to work regardless of the compiler version used to create the module. 

Starting with FirstSpirit 2023.11, artifacts like the isolated-runtime jar will require Java 17 to compile when used as a dependency in your project.

Is it safe to use the new bytecode version now? 

The new bytecode version of Java 17 is 61.0 and supports new language features like records and text blocks. To use those, it is necessary to compile your module with Java 17 and set the bytecode version accordingly. A FirstSpirit server running with Java 17 will be able to load those modules. 

If your build pipeline supports compilation with the new bytecode version depends on the responsibility for the pipeline: On-premises customers are free to modify their pipeline on their own terms while Cloud customers rely on the build infrastructure provided by Crownpeak. Java 17 support for the latter will be available in the next months. 

How do we configure the build pipeline to use Java 17?

If your build pipeline uses Gradle, look for this line:


// Groovy
tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'

// Kotlin
tasks.withType<JavaCompile> {
    options.encoding = "UTF-8"



Updating the "release" option to 17 will instruct Gradle to generate Java 17 bytecode.

Please note that Gradle supports Java 17 since version 7.3. If you are currently using an older version, please update the Gradle Wrapper.

Which steps are required to update the Java version of a FirstSpirit server? 

  1. Ensure that the FirstSpirit version is at least 2023.1 and the backend is up to date. 
  2. Install the latest version of Java 17 
  3. Shutdown the FirstSpirit server 
  4. Point to the correct location 
  5. Start the FirstSpirit server 

Wrapper configuration files shipped with FirstSpirit will detect the Java version in use and apply the correct JVM parameters automatically. 

Please note that it is also recommended to use the new Java version for your application server (e.g., Tomcat). 

Labels (1)