Microsoft today announced its "Microsoft Build of OpenJDK 21," taking advantage of new features and functionality in Java 21.
In its "About the Microsoft Build of OpenJDK" guidance, the company says: "The Microsoft Build of OpenJDK is a no-cost distribution of OpenJDK that's open source and available for free for anyone to deploy anywhere. It includes Long-Term Support (LTS) binaries for Java 11 and Java 17 on x64 server and desktop environments on macOS, Linux, and Windows, AArch64/ARM64 on Linux and Windows, binaries for macOS on Apple Silicon (AArch64/M1), and musl libc compiled binaries for Alpine Linux on x64."
Microsoft, crowing that "We use more Java than one can imagine," previously ramped up its open source Java efforts back in 2021 with binaries for Java 11, continuing the effort last year with an offering based on Java 17.
Now, the Java 21-based binaries are available 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," Microsoft said today. "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."
One highlight of the release is simplified learning for beginners, thanks to the preview of unnamed classes and instance main methods. "The pathway for novices to start their Java journey becomes smoother," the company said. "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."
Although Microsoft didn't call out any single ground-breaking new features equivalent to Generics or Lambdas, it provided a list of "features in Java 21 we are excited about" concerning APIs, language features and HotSpot JVM capabilities delivered through the OpenJDK reference implementation, with links to related JDK Enhancement Proposals (JEP) for more information:
- Elevating Flexibility with Patterns and Variables
- Boosting Application Performance with Generational ZGC
- Deconstructing Record Values with Record Patterns
- Enhancing Data Queries with Pattern Matching for Switch
- Unveiling the Power of Virtual Threads
- Sequenced Collections -- Addressing the Gaps
- Redefining Strings with String Templates
The company also highlighted other Java moves, including the new release 0.2.9 of the Semantic Kernel for Java, , part of its open source SDK that lets developers easily combine AI services like OpenAI, Azure OpenAI and Hugging Face with conventional programming languages like C# and Python. It's a key component of the company's advanced generative AI tooling.
On Tuesday, Microsoft introduced Build Server for Gradle. "The Build Server for Gradle, developed in collaboration with Gradle Enterprise, will delegate build tasks to the Gradle build tool, which will be responsible for compiling and generating code directly," said the company, noting that it resolves two major issues:
- Compiled files are output to the "bin" directory, which differs from Gradle project's default output location.
- Support for code generation, such as Annotation Processing, is suboptimal.
The day before that announcement, Microsoft highlighted its Reliable Web App Patter on Azure for Java.