Microsoft Releases Its Own Distro of Java 21

Microsoft has announced that it has delivered its own distribution of the Microsoft Build of OpenJDK 21 binaries for download.
“The recent 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,” said Bruno Borges, Principal PM Manager for Java Engineering Group at Microsoft, in a blog post. “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.”
Regarding new features, Microsoft highlighted 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.
“This release exemplifies the value of open source. With OpenJDK 21 available to the community, Microsoft is free to release that as a part of its own JDK, complete with all of the new features version 21 has to offer and supported by its own long-term licensing plan,” said Brad Shimmin, an analyst with Omdia. “It’s good for Java itself, and it’s good for the ecosystem of both developers and providers, which can rely on the fact that Java 21 from Oracle and Java 21 from Microsoft will work the same, even across these two highly unique communities.”
Microsoft’s continuing support for OpenJDK is a strong indicator of how important Java is in the enterprise software space.
“And the new features of Java 21 such as lightweight threads are maintaining Java’s relevance in the cloud native age,” said Mike Milinkovich, executive director of the Eclipse Foundation. “Being one of the first vendors to ship Java SE 21 support shows how focused Microsoft is in meeting the needs of Java developers deploying workloads on Azure.”
Also, Spring developers will be pleased to know that Spring Boot 3.2 now supports Java 21 features. Many other frameworks and libraries will soon release their JDK 21-supported versions.
“Microsoft has some of the best developer tool makers in the world — to have them add Java to the mix makes sense,” said Richard Campbell, founder of Campbell & Associates. “Of course, that happened a couple of years ago, and JDK 21 is just the latest implementation. In the end, Microsoft wants to ensure that Azure is a great place to run Java, so having a team working on Java running in Azure helps to make that true. What does it mean for the ecosystem? More choices for implementations of Java, better Java tooling, and more places to run Java fast and securely.”
New Features
Meanwhile, Borges wrote that some of the features in Java 21 Oracle is excited about, in terms of APIs, Language features, and HotSpot JVM capabilities delivered through the OpenJDK reference implementation, include:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
Oracle delivered Java 21 at its recent Oracle CloudWorld conference in Las Vegas.
Commitment to Java
“Microsoft continues to show its commitment to Java with the release of Microsoft Build of OpenJDK 21,” said Rob Sanfilippo, an analyst with Directions on Microsoft. “This release has helpful enhancements such as virtual threads and improved garbage collection. Several Azure services provide a Java runtime, such as App Service, Functions, and Cloud Shell. It’s likely these will support JDK 21 soon, but the support schedules have not been announced, so customers of those services using Java should adjust plans to use JDK 21 accordingly.”
In addition, Borges noted that:
- 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.
- JDK 21 will soon be available across Azure PaaS services. Check the Azure service of your preference for updates on documentation and announcements.
- Binaries of JDK 21 will be Long-Term Supported (LTS) by Microsoft. Check the support page for updates.
- We now have a proof-of-concept launcher for running Java inside Windows Containers in Process Isolation Mode. If you are looking for support for Java inside Windows Containers, please let us know.