How to plan and execute Jenkins upgrades safely, including in-place, blue-green, and phased paths …
Jenkins Java Compatibility: From Java 8 to Java 25 Jenkins Java Compatibility: From Java 8 to Java 25

Summary

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
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 |
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.
Which Java version does your current Jenkins deployment run on, and are you ready for the Java 21 floor?
Expand your knowledge with Jenkins LTS vs Weekly: Which Version Should You Use?
References
- Jenkins Project. (2026). Java Support Policy. Jenkins Documentation.
- Jenkins Project. (2024). Jenkins requires Java 17 or newer. Jenkins Blog.
- Jenkins Project. (2026). LTS Changelog. Jenkins Releases.
Similar Articles
Related Content
More from devops
Build a multi-container app with Docker Compose, then build images with Docker Bake and push them to …
Set up a Kubernetes cluster on AWS EKS with eksctl: prerequisites, one-command cluster creation, …
You Might Also Like
Master Jenkins Configuration as Code (JCasC) to automate CI/CD setup. Learn YAML-based config, …
Complete tutorial on deploying Jenkins to Amazon EKS. Learn what pods are, why deployments matter, …

