September 28th, 2023

Announcing Microsoft Build of OpenJDK 21

Bruno Borges
Principal PM Manager

Today we are excited to share the Microsoft Build of OpenJDK 21 binaries for download.

The release of Java 21, which includes both Language and Virtual Machine specifications changes, contains a series of features that sets Java 21 apart from many previous releases. Similarly to how Java 5 changed Java development with the introduction of Generics, and Java 8 with the introduction of Lambdas, the Java community expects the 21st release to significantly and positively impact the Java ecosystem, and we are thrilled to be part of this era of Modern Java Development.

Java 21 came right at a time when Fall starts on the Northern Hemisphere, and Spring kicks off on the Southern side of the globe. Certainly, this leaves Spring developers like Josh Long super excited now that Spring Boot 3.2 supports Java 21 features. Many other frameworks and libraries will soon release their JDK 21 supported versions.

Some of the features in Java 21 we are excited about, both in terms of APIs, Language features, and HotSpot JVM capabilities delivered through the OpenJDK reference implementation, include:

  1. Simplified Java Learning for Beginners: With the preview of unnamed classes and instance main methods, the pathway for novices to start their Java journey becomes smoother. This change paves the way for a seamless transition from basic to advanced Java programming, ensuring learners have a gradual and intuitive experience. This opens opportunities for integrating simplified coding experience of serverless functions in services like Azure Functions.

  2. Elevating Flexibility with Patterns and Variables: Introducing the preview of unnamed patterns and variables. Denoted by an underscore _, these patterns and variables bolster Java’s match and initialization capabilities.

  3. Boosting Application Performance with Generational ZGC: The Generational ZGC enhancement focuses on performance optimization, reducing the risks of allocation stalls, cutting down on heap memory overhead, and lessening garbage collection CPU overhead. All this, without compromising on the throughput.

  4. Deconstructing Record Values with Record Patterns: Having undergone refinement in JDK 19 and JDK 20, the record patterns in JDK 21 allow for a richer, more expressive data navigation and processing mechanism, co-evolving with pattern matching for switch expressions and statements.

  5. Enhancing Data Queries with Pattern Matching for Switch: Making its final refined appearance in JDK 21, this feature broadens the capabilities of switch expressions and statements, allowing for a safer, more expressive, and concise data-oriented query mechanism.

  6. Unveiling the Power of Virtual Threads: Finalized in JDK 21, virtual threads redefine high-throughput concurrent applications. Offering almost seamless integration with the lang.Thread API and ensuring optimal scalability, this feature is all set to revolutionize concurrent programming.

  7. Sequenced Collections – Addressing the Gaps: With the introduction of sequenced collections, JDK 21 bridges the gap in Java’s collections framework, offering a more unified and streamlined approach to managing collections.

  8. Redefining Strings with String Templates: The preview of string templates brings forth a synergy between literal text and runtime computations. This feature aims to enhance readability, security, flexibility, and simplification, especially when working with strings derived from non-Java languages.

Furthermore, we want to highlight the new release 0.2.9 of the Semantic Kernel for Java. Announced back in July, this library will bolster Java applications, and serve as a valuable asset for developers to enhance the capabilities of new and existing applications with augmented intelligence through easy and idiomatic integration of LLMs and AI.

Join us in embracing this new chapter of Java development, where innovation meets functionality, and where we’re committed to ensuring that Java remains a solid choice for developers around the globe. And if you can catch us at Devoxx Belgium 2023 next week, check out our Pioneering the Future of Java with Intelligent Apps article.

Happy Java coding!

Notes

  1. Container images will only be offered for Ubuntu and Mariner 2.0. The Mariner 1.0 Linux distribution has reached EOL and shall no longer be used. Existing Mariner 1.0 images (for 11 and 17) will be removed in October.
  2. JDK 21 will soon be available across Azure PaaS services. Check the Azure service of your preference for updates on documentation and announcements.
  3. Binaries of JDK 21 will be Long-Term Supported (LTS) by Microsoft. Check the support page for updates.
  4. We now have a proof-of-concept launcher for running Java inside Windows Containers in Process Isolation Mode. If you are looking for support of Java inside Windows Containers, please let us know.
Category
JavaOpenJDK

Author

Bruno Borges
Principal PM Manager

Bruno is Principal Program Manager for Microsoft's Java Engineering Group. Previously the Java lead for Azure Developer Relations. Conference speaker, open source contributor, Java Champion and influencer, Twitter junkie, beer sommelier.

6 comments

Discussion is closed. Login to edit/delete existing comments.

  • trung-development

    I would like to know when Java 21 for Azure App Services is supported as well, in stable form or even beta form.

    What kind of procedure does it take for Microsoft Azure to support the new Java version? Where can we get the latest information about this? How can we even contribute, if possible?

    • Joaquin VanoMicrosoft employee · Edited

      We are currently working on an update release for App Service that will include Java 21 for our Java SE and Tomcat offerings. It will land it first on App Service Linux by Q1 next year. For Windows, we expect to have it by Q2 next year.

      For more information:
      https://learn.microsoft.com/en-us/azure/app-service/language-support-policy

  • Panagiotis Velachoutakos

    Any estimate of when v21 will be available in app service and Azure DevOps

    Thank you
    P

    • Joaquin VanoMicrosoft employee · Edited

      We are currently working on an update release for App Service that will include Java 21 for our Java SE and Tomcat offerings.

      • Zaprawa Cezary (BD/XDP2)

        Hello. Any update on a concrete date for Linux App Services? Thanks in advance!

      • Joaquin VanoMicrosoft employee

        It will land it first on App Service Linux by Q1 next year. For Windows, we expect to have it by Q2.

'; block.insertAdjacentElement('beforebegin', codeheader); let button = codeheader.querySelector('.copy-button'); button.addEventListener("click", async () => { let blockToCopy = block; await copyCode(blockToCopy, button); }); } }); async function copyCode(blockToCopy, button) { let code = blockToCopy.querySelector("code"); let text = ''; if (code) { text = code.innerText; } else { text = blockToCopy.innerText; } try { await navigator.clipboard.writeText(text); } catch (err) { console.error('Failed to copy:', err); } button.innerText = "Copied"; setTimeout(() => { button.innerHTML = '' + svgCodeIcon + ' Copy'; }, 1400); }