Support for Java 23 and improvements for SameSite cookie handling in 24.0.0.10-beta
This beta release introduces support for Java SE 23. It also provides a way to handle incompatible client versions when you use SameSite cookies.
The Open Liberty 24.0.0.10-beta includes the following beta features (along with all GA features):
See also previous Open Liberty beta blog posts.
Try out beta support for Java 23
Java 23 is the latest release of Java, expected out this month (September 2024). It contains new features and enhancements over previous versions of Java. However, Java 23 is not a long-term support (LTS) release and support for it is dropped after the next version of Java is supported. It offers some new functionality and changes that you are going to want to check out for yourself.
Check out the JEP changes in Java 23:
Take advantage of the new changes in Java 23 in Open Liberty now and get more time to review your applications, microservices, and runtime environments on your favorite server runtime!
To start using Java 23 with Open Liberty:
-
Download the latest release of Java 23
-
Download and install the 24.0.0.10-beta version of Open Liberty
-
Edit your Liberty server.env file to point
JAVA_HOME
to your Java 23 installation -
Start testing today!
For more information on Java 23, see the Java 23 release notes page, API Javadoc page, or download page. For more information on Open Liberty, see the Open Liberty docs.
*Note: As we work toward full Java 23 support, please bear with any of our functions that might not be ready yet.
Check for Samesite=None incompatible clients
In 24.0.0.10-beta, you can now use SameSite=None
cookies without the worry of breaking certain client versions. Previously, cookies with the SameSite=None
attribute were rejected or mishandled (treated as SameSite=Strict
) if they were sent to an incompatible client version. Now, Open Liberty intercepts cookies with the SameSite=None
attribute before they are sent to the web browser and checks if the User-Agent
specifies an incompatible client version. If an incompatible client is detected, the SameSite=None
and Partitioned
headers (if present) are removed from the cookie.
For more information, see Setting the SameSite attribute on cookies with Open Liberty.
Try it now
To try out these features, update your build tools to pull the Open Liberty All Beta Features package instead of the main release. The beta works with Java SE versions:
-
Java SE 23
-
Java SE 22
-
Java SE 21
-
Java SE 17
-
Java SE 11
-
Java SE 8
If you’re using Maven, you can install the All Beta Features package by using:
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.10.3</version>
<configuration>
<runtimeArtifact>
<groupId>io.openliberty.beta</groupId>
<artifactId>openliberty-runtime</artifactId>
<version>24.0.0.10-beta</version>
<type>zip</type>
</runtimeArtifact>
</configuration>
</plugin>
You must also add dependencies to your pom.xml file for the beta version of the APIs that are associated with the beta features that you want to try. For example, the following block adds dependencies for two example beta APIs:
<dependency>
<groupId>org.example.spec</groupId>
<artifactId>exampleApi</artifactId>
<version>7.0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>example.platform</groupId>
<artifactId>example.example-api</artifactId>
<version>11.0.0</version>
<scope>provided</scope>
</dependency>
Or for Gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'io.openliberty.tools:liberty-gradle-plugin:3.8.3'
}
}
apply plugin: 'liberty'
dependencies {
libertyRuntime group: 'io.openliberty.beta', name: 'openliberty-runtime', version: '[24.0.0.10-beta,)'
}
Or if you’re using container images:
FROM icr.io/appcafe/open-liberty:beta
Or take a look at our Downloads page.
If you’re using IntelliJ IDEA, Visual Studio Code or Eclipse IDE, you can also take advantage of our open source Liberty developer tools to enable effective development, testing, debugging, and application management all from within your IDE.
For more information on using a beta release, refer to the Installing Open Liberty beta releases documentation.
We welcome your feedback
Let us know what you think on our mailing list. If you hit a problem, post a question on StackOverflow. If you hit a bug, please raise an issue.