Java requirements

There are separate run and job execution requirements for Jenkins installations.

Running Jenkins system

Jenkins requires Java 11 or 17 since Jenkins 2.357 and LTS 2.361.1. Read more about this in the announcement blog post.

Upgrading Java version to 11

Upgrading an existing Jenkins setup from Java 8 to Java 11? Refer to the upgrade guidelines.

Running Jenkins on Java 11 in Docker

Java 11 Docker installation instructions are included in "Downloading and running Jenkins in Docker". Alternatively, the jenkins/jenkins:jdk17 Docker image allows you to run the Jenkins controller on Java 17.

All other Java versions are not supported.

These requirements apply to all components of the Jenkins system, including the Jenkins controller, all types of agents, CLI clients, and other components.

The Jenkins project performs a full test flow with the following JDK/JREs:

  • OpenJDK JDK / JRE 11 - 64 bits

  • OpenJDK JDK / JRE 17 - 64 bits

JRE/JDKs from other vendors are supported and may be used. Refer to our issue tracker for known Java compatibility issues. Jenkins maintainers actively test HotSpot based Java virtual machines like those from OpenJDK, Eclipse Temurin, and Amazon Corretto. Jenkins maintainers do not test Eclipse OpenJ9 based Java virtual machines. The Platform SIG stopped its work on OpenJ9 based Java virtual machines in August 2021.

Running Java-based tools and builds on Jenkins

The version of the JDK used to build Java-based projects, or the version of Java used to run Java-based tools is independent from the version of Java used to run the Jenkins controller and agent processes. During a build, any version of the JRE or JDK can be launched as long as it’s compatible with the system the build is running on. This includes:

  • Execution of java or javac from shell build steps and similar

  • Execution of Maven/Ant/… build steps using a JDK managed by a JDK tool installer

A few plugins have more strict requirements, generally requiring that a build is executing in the same version of Java as is used to run the Jenkins controller and agents. A notable example of that is Maven Integration Plugin, which requires that the version of the JDK used for the Maven build must be at least the same version as is used for the Jenkins controller. These cases are generally documented in the plugin documentation.

Monitoring Java versions

Modern versions of Jenkins controllers and Jenkins agents verify Java requirements and notify users when they are launched with an unsupported version.

The Versions Node Monitors plugin provides detailed Java version monitoring.

Java Development Kits Used

The Jenkins project uses Eclipse Temurin as its primary JDK for building and testing Java based applications. This includes:

Some of the reasons for choosing Temurin are:

  • Availability over a wide range of platforms, including different operating systems and architectures, over many different Java SE versions.

  • Regular maintenance and long term support provided by the Eclipse Foundation.