Java 21 is finally here! Java 21 is the first long-term support (LTS) release since Java 17 was released two years ago. It offers some new functionality and changes that you’ll want to check out for yourself. In particular, there’s the introduction of virtual threads. And you can try it all out now on Open Liberty 22.214.171.124.
Open Liberty is a developer-friendly, fast, modular Java application runtime for the cloud. The Open Liberty project began six years ago when IBM open-sourced the Liberty Java runtime. IBM’s commercial Java runtime, WebSphere Liberty, is built from the Open Liberty project. You can use Open Liberty for free though.
In this release of Open Liberty, in addition to support for Java 21, we also have an update to Liberty’s featureUtility command, which you use to install modular features in the core Liberty runtime; the command now verifies feature authenticity by default when you install a new feature into Liberty.
In Open Liberty 126.96.36.199:
View the list of fixed bugs in 188.8.131.52.
Check out previous Open Liberty GA release blog posts.
Try Java 21 on Open Liberty 184.108.40.206 now
Available through Maven, Gradle, Docker, and as a downloadable archive.
Support for Java 21
Try out the new changes in Java 21 now and test your applications, microservices, and runtime environments.
To run Open Liberty with Java 21:
Download and install Open Liberty 220.127.116.11, or later.
Download the latest release of Java 21 from adoptium.net.
Edit your Open Liberty runtime server.env file to point JAVA_HOME to your Java 21 installation.
Here are some highlights of the changes between Java 18 and Java 21:
400: UTF-8 by Default
408: Simple Web Server
413: Code Snippets in Java API Documentation
416: Reimplement Core Reflection with Method Handles
418: Internet-Address Resolution SPI
421: Deprecate Finalization for Removal
422: Linux/RISC-V Port
431: Sequenced Collections
439: Generational ZGC
440: Record Patterns
441: Pattern Matching for switch
449: Deprecate the Windows 32-bit x86 Port for Removal
451: Prepare to Disallow the Dynamic Loading of Agents
452: Key Encapsulation Mechanism API
But perhaps the most anticipated one of all is the introduction of virtual threads in Java 21:
444: Virtual Threads
Virtual threads were designed to provide higher throughput for running tasks that spend most of their time blocked, like waiting for I/O operations. Will the impact of virtual threads live up to the anticipation? Find out for yourself by trying them out in your applications that run on the best Java runtime, Open Liberty!
For more information on Java 21, see:
featureUtility now verifies feature signatures by default
The featureUtility command now verifies feature signatures before installing the feature into the Liberty runtime. It identifies whether the feature originated from the Liberty development team or is a third-party user feature.
Previously, the featureUtility tool only verified checksums. While checksums are essential for integrity (showing that the file has not been tampered with), verifying checksums did not ensure the authenticity of downloaded files.
We’ve now implemented an additional step in the process of verifying feature signatures to check both the authenticity and integrity of features that are downloaded from the Maven Central repository.
When running the featureUtility command:
The default behavior is now –verify=enforce, meaning that it verifies all specified Liberty features.
To keep the old behavior instead, you can skip the verification process by using the –verify=skip parameter.
Alternatively, you can set the verification option through environment variables or a featureUtility.properties file.
For more information, see:
Develop and run your apps using Open Liberty 18.104.22.168
If you’re using Maven, include the following in your pom.xml file:
Or for Gradle, include the following in your build.gradle file:
apply plugin: ‘liberty’
Or if you’re using container images:
Or take a look at our Downloads page.
If you’re using IntelliJ IDEA, Visual Studio Code, or Eclipse IDE, try our open source Liberty developer tools for efficient development, testing, debugging, and application management, all within your IDE.
The post Start using Java 21 in your apps on Open Liberty 22.214.171.124 appeared first on foojay.