# Jenkins Java Compatibility: From Java 8 to Java 25

- URL: https://karandeepsingh.ca/posts/jenkins-java-compatibility/
- Author: Karandeep Singh
- Published: 2024-10-15
- Updated: 2026-06-27
- Series: Running Jenkins
- Tags: jenkins
- Summary: Jenkins JVM requirements and the Java 8 to 11 to 17 to 21 to 25 transition timeline, with version-by-version compatibility and tuning notes.

![Close-up of a computer motherboard representing Jenkins build infrastructure](https://karandeepsingh.ca/images/posts/jenkins-versions.jpg)

Jenkins' relationship with the Java runtime has shaped its release history more than almost any other factor. This guide walks through the JVM version each Jenkins release requires and the Java 8 → 11 → 17 → 21 → 25 transition timeline.

## JVM Compatibility in Depth

### The Java Compatibility Journey

One of the most significant aspects of Jenkins version evolution has been its relationship with Java. Each major Jenkins version designates compatibility with specific Java runtime environments, creating distinct epochs in Jenkins history.

### Detailed Java Version Compatibility

| Jenkins Version Range | Minimum Java | Recommended | Maximum Tested | Performance Notes |
|------------------------|--------------|-------------|----------------|-------------------|
| 1.x - 2.46 | Java 7 | Java 7/8 | Java 8 | Limited features |
| 2.47 - 2.356 (Apr 2022) | Java 8 | Java 8/11 | Java 11 | Java 11 provides better memory usage |
| 2.357 - 2.360 | Java 8 | Java 11 | Java 11/17 | Transition release |
| 2.361.1 LTS (Jun 2022) | Java 11 | Java 11/17 | Java 17 | Java 8 support fully removed |
| 2.387+ (Jan 2023) | Java 11 | Java 17 | Java 17/21 | Java 17 performance improvements |
| 2.426+ (Oct 2023) | Java 11 | Java 17/21 | Java 21 | Java 21 virtual threads beneficial |
| 2.463 weekly (Jun 2024) / 2.479.1 LTS (Oct 2024) | Java 17 | Java 17/21 | Java 21 | Java 11 support removed (controller and agents) |
| 2.555.1 LTS (May 2026) and later | Java 21 | Java 21 | Java 25 | Java 17 support removed; Java 25 container images added |

#### The Java 7 Era (Jenkins 1.625 - 2.46)

Early Jenkins versions required Java 7, which was the prevalent enterprise standard when Jenkins gained widespread adoption. This established a baseline of functionality but also imposed limitations on modern language features and performance optimizations.

#### The Java 8 Era (Jenkins 2.54 - 2.356)

Jenkins 2.54, released in April 2017, marked the beginning of mandatory Java 8 support. This long-lived era represented stability for many organizations, allowing Jenkins to use:

- Lambda expressions for more concise code
- Stream API for efficient data processing
- Improved date and time handling
- Enhanced concurrency tools

Java 8 remained the minimum requirement for nearly five years, constituting the longest period of stable JVM requirements in Jenkins history.

#### The Critical Java 11 Transition (Jenkins 2.357+)

Perhaps the most significant compatibility breakpoint came in mid-2022: Java 11 became the minimum JVM at weekly release 2.357 (June 2022) and was first required in the 2.361.1 LTS, finalizing the transition away from Java 8.

This shift created challenges for many organizations but delivered substantial benefits:

- Improved security through enhanced encryption
- Better performance with G1GC garbage collector as default
- Enhanced HTTP client capabilities
- Improved containerization support
- More efficient memory management

**warning:**
If your organization still runs Jenkins on Java 8, 11, or 17, action is required. Jenkins 2.361.1 LTS dropped Java 8; the Java 17 transition (weekly 2.463 in June 2024, LTS 2.479.1 in October 2024) removed Java 11 for both the controller and agents; and Jenkins 2.555.1 LTS (May 2026) removed Java 17. To run the current LTS line you must be on **Java 21** (Java 25 is also supported). Continued use of older versions exposes your pipelines to unpatched security vulnerabilities.

#### The Modern Era: Java 21 Required, Java 25 Supported

Beginning with Jenkins 2.387 in early 2023, Java 17 became fully supported. In June 2024, weekly release 2.463 made **Java 17 the minimum requirement**, officially dropping Java 11 support; the first LTS to require Java 17, 2.479.1, shipped in October 2024. At that point Java 11 was removed for both the controller and agents.

The next transition followed the same playbook. Java 21 became the minimum for **weekly releases as of January 6, 2026**, and for LTS at **2.555.1 (May 13, 2026)**, which also removed Java 17 support. The current LTS line therefore runs on **Java 21**, with **Java 25** also supported (Java 25 container images were added).

Java 17, 21, and 25 bring major improvements:

- Virtual threads (Java 21) for significantly improved concurrency
- Enhanced pattern matching for more reliable code
- Sealed classes for better API design
- Improved startup performance
- Significantly better memory management

Under the Jenkins "2+2+2" Java support plan, Jenkins supports each Java LTS release for approximately four years, meaning two Java LTS releases are supported at any given time.

### JVM-Specific Optimizations

#### JVM Flags for Optimal Performance

```
-XX:+AlwaysPreTouch
-XX:+UseG1GC
-XX:+ExplicitGCInvokesConcurrent
-XX:+ParallelRefProcEnabled
-XX:+DisableExplicitGC
-XX:+HeapDumpOnOutOfMemoryError
```

#### Java Distribution Recommendations
- **Eclipse Temurin (AdoptOpenJDK)**: Most recommended for Jenkins
- **Amazon Corretto**: Good choice for AWS deployments
- **Azul Zulu**: Good enterprise support options
- **OpenJDK**: Standard reference implementation
- **Oracle JDK**: Requires licensing for commercial use

#### Memory Settings by Deployment Size

| Deployment Size | Recommended Heap | GC Settings |
|-----------------|------------------|-------------|
| Small | -Xmx4g -Xms2g | Default G1GC |
| Medium | -Xmx8g -Xms4g | Tuned G1GC |
| Large | -Xmx16g+ -Xms8g+ | Carefully tuned GC with monitoring |

**Advanced JVM Debugging Tips**
When troubleshooting Java compatibility issues during Jenkins upgrades, these advanced debugging flags can provide crucial insights:

- `-XX:+HeapDumpOnOutOfMemoryError` - Creates heap dump on OOM errors
- `-Xlog:gc*=debug:file=gc.log` - Detailed garbage collection logging
- `-Djava.security.debug=access,failure` - Security manager debugging
- `-Djenkins.security.ClassFilterImpl.SUPPRESS_WHITELIST=true` - For script security issues

Remember to remove these flags in production environments after resolving issues.

This article is part of the [Jenkins LTS vs Weekly guide](https://karandeepsingh.ca/posts/comprehensive-guide-to-jenkins-versions/).

**Question:** Which Java version does your current Jenkins deployment run on, and are you ready for the Java 21 floor?

## References

- Jenkins Project. (2026). [Java Support Policy](https://www.jenkins.io/doc/book/platform-information/support-policy-java/). Jenkins Documentation.
- Jenkins Project. (2024). [Jenkins requires Java 17 or newer](https://www.jenkins.io/blog/2024/06/11/require-java-17/). Jenkins Blog.
- Jenkins Project. (2026). [LTS Changelog](https://www.jenkins.io/changelog-stable/). Jenkins Releases.
