/user/kayd @ devops :~$ cat jenkins-java-compatibility.md

Jenkins Java Compatibility: From Java 8 to Java 25 Jenkins Java Compatibility: From Java 8 to Java 25

QR Code linking to: Jenkins Java Compatibility: From Java 8 to Java 25
Karandeep Singh
Karandeep Singh
• 5 minutes

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

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 RangeMinimum JavaRecommendedMaximum TestedPerformance Notes
1.x - 2.46Java 7Java 7/8Java 8Limited features
2.47 - 2.356 (Apr 2022)Java 8Java 8/11Java 11Java 11 provides better memory usage
2.357 - 2.360Java 8Java 11Java 11/17Transition release
2.361.1 LTS (Jun 2022)Java 11Java 11/17Java 17Java 8 support fully removed
2.387+ (Jan 2023)Java 11Java 17Java 17/21Java 17 performance improvements
2.426+ (Oct 2023)Java 11Java 17/21Java 21Java 21 virtual threads beneficial
2.463 weekly (Jun 2024) / 2.479.1 LTS (Oct 2024)Java 17Java 17/21Java 21Java 11 support removed (controller and agents)
2.555.1 LTS (May 2026) and laterJava 21Java 21Java 25Java 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 SizeRecommended HeapGC Settings
Small-Xmx4g -Xms2gDefault G1GC
Medium-Xmx8g -Xms4gTuned 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.

Question

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

References

Similar Articles

More from devops