Please refer to the Running Jenkins on Java 17 documentation for up-to-date details on how to run Jenkins on Java 17.
Jenkins, one of the leading open-source automation servers, does not yet officially support Java 17. On September 14, 2021, OpenJDK 17 was released. This is a Long-Term-Support (LTS) release, and it will stay around for years. The Jenkins project is eager to offer full support of this version. Over the last year, many contributors have been working toward enabling support for Java 17 in the project. It was a thorny path, but now, on behalf of the Jenkins Platform SIG, we are happy to announce preview availability of Java 17 support in Jenkins weekly releases!
Why do we need preview availability for Java 17? It offers Jenkins contributors and early adopters a way to try out the changes before the general availability release happens later this year. It should help us to get more exploratory testing and, hopefully, resolve most of the issues before Java 17 is officially supported in Jenkins.
In this blog post we will describe how to run with Java 17 and how to investigate and report compatibility issues.
A group of contributors has been working on Java 17 support, focusing on enabling Java 17 support in development tools, testing, and addressing known compatibility issues. See the Platform SIG meeting notes for detailed status updates. Starting with Jenkins 2.339, Jenkins successfully runs with latest OpenJDK 17 releases on various Linux and Windows platforms. We performed a lot of automated and exploratory tests. Jenkins plugins appear to work well. There is ongoing test automation effort toward the GA release, but we were able to successfully run Jenkins core tests and Plugin Compatibility Tester for recommended plugins.
For several months, we have provided Docker images for the Jenkins controller and agent. All these images are based on the official Debian stable and Eclipse Temurin images maintained by the Docker community.
Java 17 support is now provided as a part of the official jenkins/jenkins image. You can run Jenkins with Java 17 simply as:
docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:jdk17-preview
The following tags are available:
Latest weekly release with Java 17 support
Weekly releases packaged with Java 17
The image is fully compatible with
the official Jenkins Docker image documentation,
e.g., you can use
plugins.txt to install plugins, mount volumes, and pass extra options via environment variables.
As with Java 11, you can start Jenkins using the
java -jar jenkins.war --enable-future-java
In March 2022, the community performed many exploratory tests to discover as many Java 17 issues as possible.
As a result, the community solved a lot of problems before announcing Java 17 support in Jenkins. However, it is still possible that some plugins have not been updated to support Java 17.
If you find a regression in a plugin, please file a bug report in Jira:
For security issues, please use the standard vulnerability reporting process. Although we will be fixing Java 17 specific issues in public while Java 17 support is in preview, following the security process will help us to investigate the impact on Java 8 and 11 users.
We appreciate any and all contributions in the Java 17 effort, including trying out Jenkins with Java 17 and reporting or fixing compatibility issues.
If you want to do exploratory testing, we recommend trying out Java 17 support on one of your test controllers. Such testing is highly appreciated, especially if you use some service integration plugins or exotic platforms.
If you are a plugin developer/maintainer, we would appreciate if you could test your plugin with Java 17. Java 17 developer guidelines are forthcoming.
Whatever you do, please let us know about your experience by sending a message to the Platform SIG mailing list. This information will help us track changes and contributions. Any other feedback about the migration will be appreciated!
We will soon be updating the toolchain to support Java 17. At that point, we will publish documentation for plugin developers explaining how to test plugins with Java 17.
In the coming weeks we will focus on addressing feedback from early adopters and fixing any discovered compatibility issues. We will also continue working on Java 17 support patches toward general availability later this year.