Migrating to Java 17: The Hows, Whys, and Whens

Written by: Samantha Frost
4 min read

With the increasing adoption of Java 17, the Jenkins® and CloudBees community has been abuzz about the numerous benefits it brings, including improved performance, enhanced security, new language features, and long-term support. 

CloudBees Continuous Integration (CloudBees CI) will support Java 17 in January/February of 2024, so now is the time to start planning the migration!  Here, we delve into why migrating to Java 17 is beneficial and how CloudBees CI facilitates the transition.

Why Migrate to Java 17?

Let’s be honest, we all love a good upgrade, especially when it offers a slew of improvements. As you ponder over whether to make the leap from an earlier version of Java to Java 17, here's a handful of compelling reasons to convince you.

Improved Performance

Java 17 boasts several performance enhancements, like faster garbage collection and improved startup time. These improvements can lead to speedier application execution and reduced memory usage. So, why stick around with the old when you can race ahead with the new?

Security Updates

Security is essential in today's digital realm. With Java 17, you can capitalize on updates that address vulnerabilities and potential security threats, making your applications more secure than ever.

New Language Features

Java 17 introduces new language features, such as switch expressions and text blocks, which can improve code readability and make development more efficient. Who doesn't love a bit of efficiency in their code?

Bug Fixes

Java 17 comes packed with bug fixes for issues found in earlier versions of Java. This means more stable and reliable applications for you and your users.

Long-term Support

Java 8 reached the end of its free public updates in January 2019, Java 11 will reach its end of public support in late 2024.  On the other hand, Java 17 is a long-term support (LTS) release, meaning it will receive general updates for longer. This makes Java 17 an excellent choice for those seeking longevity and stability.

Transitioning to the 1+2+2 Java Support Model

The release cadence of Java has changed, and long-term support releases now occur every two years. This means that at any point in time, three Java LTS releases are officially supported by the OpenJDK project and the Eclipse Temurin project.

However, in an effort to improve and simplify CloudBees CI, we have decided to generally support two Java LTS releases, rather than three. This move is not only aimed at leveraging the latest Java capabilities but also at reducing maintenance overhead associated with older Java releases.

CloudBees CI's Symbiotic Approach

Taking a cue from the open-source Jenkins Project who will be adopting a “2+2+2” model, CloudBees is adopting a “1+2+2” model. Under this model, a new Java LTS is supported for a year, then it becomes the minimum required Java version for two years, and finally, it is then unsupported for the last two years.

In short, this means that a new Java LTS version will be supported for 3 years.

The Future Timeline

Here's a quick look at the future timeline under the new model:

  • CloudBees CI will support Java 17 in January/February of 2024

  • CloudBees CI will require Java 17 in October of 2024 for 12 months

  • CloudBees CI will support Java 21 in April 2025

  • CloudBees CI will require Java 21 in April 2026 for 18 months

By the time Java 25 rolls out, we will be in our desired state, where we will support Java 25 for a year before requiring it as the minimum version for two years. The cycle continues in the “1+2+2” model onward, providing clarity and consistency for our customers.

Conclusion

The shift to Java 17 is more than a simple upgrade; it's a giant leap toward improved performance, enhanced security, and long-term support. We understand it takes planning to make this leap so why not start that now? 

At CloudBees, we're committed to making this transition as smooth as possible for our customers, while staying current with the latest Java capabilities. So, let's embrace the new and bid adieu to the old. After all, change is the only constant in technology.

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.