Enable X25519MLKEM768 in Java
Java's built-in TLS gained hybrid post-quantum key exchange in JDK 27, released on 15 September 2026 (JEP 527). It's on by default: X25519MLKEM768 is first in the default list, so a Java TLS server or client on JDK 27 uses it with any peer that supports it, with no code changes.
JDK 27 also supports SecP256r1MLKEM768 and SecP384r1MLKEM1024, the second of which is the one CNSA 2.0 buyers ask about. You can add either to the list yourself.
If your Java service sits behind a load balancer or CDN that handles TLS, configure that instead.
Before you start
- Check the JDK your service runs:
java -version. You need 27 or later. - JDK 25, the current long-term support release, came out before this feature. If you have to stay on 25, check your JDK vendor's release notes for a backport.
Option 1: keep the defaults
- Look for a group list your service sets: search your start-up flags and code for
jdk.tls.namedGroupsandsetNamedGroups. - If nothing sets it, upgrade to JDK 27 or later and restart the service.
- If something does set it, remove it or add X25519MLKEM768 to the front of it (option 2).
Option 2: list the groups yourself
- Put X25519MLKEM768 first in the system property:
-Djdk.tls.namedGroups=X25519MLKEM768,x25519,secp256r1
In code, the same list goes in SSLParameters.setNamedGroups.
- Restart the service, then scan your domain below.