RELEASE NOTES: JDK 25.0.4

Notes generated: Fri Apr 10 07:09:14 CEST 2026

JEPs

None.

RELEASE NOTES

security-libs/javax.crypto

Issue Description
JDK-8347938

Add Support for the Latest ML-KEM and ML-DSA Private Key Encodings


The JDK now encodes ML-KEM and ML-DSA private keys in PKCS #8 format using the DER-encoded ASN.1 CHOICE formats defined in Section 6 of RFC 9935 and Section 6 of RFC 9881. Two new security properties (jdk.mlkem.pkcs8.encoding and jdk.mldsa.pkcs8.encoding) control the encoding used when generating new keys with a KeyPairGenerator or when translating keys with a KeyFactory. Valid values are "seed", "expandedKey", and "both" (case-insensitive). If a system property of the same name is also specified, it supersedes the security property value. All three formats are supported when decoding previously encoded private keys with a KeyFactory.

When these algorithms were introduced in JDK 24, the encoding format was equivalent to the "expandedKey" choice. This release changes the default to "seed". As a result, ML-KEM and ML-DSA private keys generated by this JDK release will not be accepted by older releases by default, although keys generated by older releases are still readable by this release. To make a new private key acceptable by older releases, set the relevant property to "expandedKey" and use KeyFactory.translateKey to convert it to the older format.


Add Support for the Latest ML-KEM and ML-DSA Private Key Encodings


The JDK now encodes ML-KEM and ML-DSA private keys in PKCS #8 format using the DER-encoded ASN.1 CHOICE formats defined in Section 6 of RFC 9935 and Section 6 of RFC 9881. Two new security properties (jdk.mlkem.pkcs8.encoding and jdk.mldsa.pkcs8.encoding) control the encoding used when generating new keys with a KeyPairGenerator or when translating keys with a KeyFactory. Valid values are "seed", "expandedKey", and "both" (case-insensitive). If a system property of the same name is also specified, it supersedes the security property value. All three formats are supported when decoding previously encoded private keys with a KeyFactory.

When these algorithms were introduced in JDK 24, the encoding format was equivalent to the "expandedKey" choice. This release changes the default to "seed". As a result, ML-KEM and ML-DSA private keys generated by this JDK release will not be accepted by older releases by default, although keys generated by older releases are still readable by this release. To make a new private key acceptable by older releases, set the relevant property to "expandedKey" and use KeyFactory.translateKey to convert it to the older format.

This change is planned to be backported to Oracle's JDK update releases that support ML-KEM and ML-DSA, so the interoperability impact is expected to be temporary.


FIXED ISSUES

client-libs/2d

Priority Bug Summary
P3 JDK-8297191 [macos] Printing a page range with starting page > 1 results in missing pages
P3 JDK-8378201 [OGL] glXMakeContextCurrent() drops the buffers of the unbound drawable
P3 JDK-8378417 Printing All pages results in NPE for 1.1 PrintJob
P3 JDK-8375065 Update LCMS to 2.18
P4 JDK-8377602 Create automated test for PageRange
P4 JDK-8369561 sun/java2d/OpenGL/DrawBitmaskImage.java#id0: Incorrect color for first pixel (actual=ff000000)

client-libs/java.awt

Priority Bug Summary
P3 JDK-8298823 [macos] java/awt/Mouse/EnterExitEvents/DragWindowTest.java continues to fail with "No MouseReleased event on label!"
P3 JDK-8378727 [macOS] Missing dispatch_release for semaphores in CDesktopPeer
P3 JDK-8376233 Clean up code in Desktop native peer
P3 JDK-8015444 java/awt/Focus/KeyStrokeTest.java sometimes fails
P3 JDK-8225787 java/awt/Window/GetScreenLocation/GetScreenLocationTest.java fails on Ubuntu
P4 JDK-8365424 [macos26] java/awt/Frame/DisposeTest.java fails on macOS 26
P4 JDK-8365423 [macos26] java/awt/MenuBar/8007006/bug8007006.java fails on macOS 26
P4 JDK-8361606 ConsumeNextMnemonicKeyTypedTest.java fails on Windows: character typed with VK_A: a
P4 JDK-8321303 Intermittent open/test/jdk/java/awt/KeyboardFocusmanager/ConsumeNextMnemonicKeyTypedTest/ConsumeNextMnemonicKeyTypedTest.java failure on Linux
P4 JDK-8374304 MultiResolutionSplashTest.java fails in CI: "Image with wrong resolution is used for splash screen!"
P4 JDK-8369251 Opensource few tests
P4 JDK-8213530 Test java/awt/Modal/ToFront/DialogToFrontModeless1Test.java fails on Linux
P4 JDK-8373239 Test java/awt/print/PrinterJob/PageRanges.java fails with incorrect selection of printed pages
P4 JDK-8203004 UnixMultiResolutionSplashTest.java fails on Ubuntu16.04

client-libs/javax.imageio

Priority Bug Summary
P4 JDK-8377167 javax/imageio/ReadAbortTest.java throw NPE when x11 unavailable

client-libs/javax.sound

Priority Bug Summary
P4 JDK-8374727 Audio configuration Platform class - use nio for getting endianness of the underlying platform

client-libs/javax.swing

Priority Bug Summary
P3 JDK-8365625 Can't change accelerator colors in Windows L&F
P3 JDK-8374506 Incorrect positioning of arrow icon in parent JMenu in Windows L&F
P3 JDK-8373650 Test "javax/swing/JMenuItem/6458123/ManualBug6458123.java" fails because the check icons are not aligned properly as expected
P3 JDK-8359433 The final modifier on Windows L&F internal UI classes prevents extending them in apps
P4 JDK-8064922 [macos] Test javax/swing/JTabbedPane/4624207/bug4624207.java fails
P4 JDK-8068293 [TEST_BUG] Test closed/com/sun/java/swing/plaf/motif/InternalFrame/4150591/bug4150591.java fails with GTKLookAndFeel
P4 JDK-8068310 [TEST_BUG] Test javax/swing/JColorChooser/Test4234761.java fails with GTKL&F
P4 JDK-8365379 SU3.applyInsets may produce wrong results
P4 JDK-8376151 Test javax/swing/JFileChooser/4966171/bug4966171.java is failing with OOME
P4 JDK-8373847 Test javax/swing/JMenuItem/MenuItemTest/bug6197830.java failed because The test case automatically fails when clicking any items in the “Nothing” menu in all four windows (Left-to-right)-Menu Item Test and (Right-to-left)-Menu Item Test
P5 JDK-8144124 [macosx] The tabs can't be aligned when we pressing the key of 'R','B','L','C' or 'T'.

core-libs

Priority Bug Summary
P4 JDK-8373718 jdk/internal/misc/VM/RuntimeArguments.java test fails in Virtual threads mode

core-libs/java.io

Priority Bug Summary
P4 JDK-8377910 Minor cleanup of java/io/FileDescriptor/Sharing.java
P4 JDK-8372851 Modify java/io/File/GetXSpace.java to print path on failure of native call
P4 JDK-8355339 Test java/io/File/GetCanonicalPath.java failed: The specified network name is no longer available
P4 JDK-8351010 Test java/io/File/GetXSpace.java failed: / usable space 56380809216 > free space 14912244940

core-libs/java.io:serialization

Priority Bug Summary
P4 JDK-8373913 Refactor serialization tests to use JUnit

core-libs/java.lang

Priority Bug Summary
P3 JDK-8373120 Virtual thread stuck in BLOCKED state
P4 JDK-8370370 Add still more cases to WorstCaseTests

core-libs/java.net

Priority Bug Summary
P3 JDK-8376031 HttpsURLConnection.getServerCertificates() throws "java.lang.IllegalStateException: connection not yet open" for the HEAD method
P4 JDK-8347167 Reduce allocation in com.sun.net.httpserver.Headers::normalize
P4 JDK-8373796 Refactor java/net/httpclient/ThrowingPublishers*.java tests to use JUnit5
P4 JDK-8373866 Refactor java/net/httpclient/ThrowingSubscribers*.java tests to use JUnit5
P4 JDK-8373893 Refactor networking http server tests to use JUnit
P4 JDK-8373676 Test javax/net/ssl/HttpsURLConnection/SubjectAltNameIP.java fails on a machine without IPV6
P4 JDK-8369950 TLS connection to IPv6 address fails with BCJSSE due to IllegalArgumentException

core-libs/java.nio

Priority Bug Summary
P4 JDK-8378878 Refactor java/nio/channels/AsynchronousSocketChannel test to use JUnit

core-libs/java.text

Priority Bug Summary
P4 JDK-8368001 java/text/Format/NumberFormat/NumberRoundTrip.java timed out

core-libs/java.util:i18n

Priority Bug Summary
P4 JDK-8362428 Update IANA Language Subtag Registry to Version 2025-08-25

core-svc/java.lang.management

Priority Bug Summary
P3 JDK-8369736 Add management interface for AOT cache creation
P4 JDK-8377944 LowMemoryTest2.java#id1 intermittent fails OOME: Metaspace

core-svc/javax.management

Priority Bug Summary
P4 JDK-8366695 Test sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java timed out

core-svc/tools

Priority Bug Summary
P4 JDK-8278102 containers/docker/TestJcmd.java failed with "RuntimeException: Could not find specified process"

hotspot/compiler

Priority Bug Summary
P3 JDK-8363943 ARM32: Represent Registers as values
P3 JDK-8376104 C2 crashes in PhiNode::Ideal(PhaseGVN*, bool) accessing NULL pointer
P3 JDK-8361699 C2: assert(can_reduce_phi(n->as_Phi())) failed: Sanity: previous reducible Phi is no longer reducible before SUT
P3 JDK-8370502 C2: segfault while adding node to IGVN worklist
P3 JDK-8370939 C2: SIGSEGV in SafePointNode::verify_input when processing MH call from Compile::process_late_inline_calls_no_inline()
P3 JDK-8339526 C2: store incorrectly removed for clone() transformed to series of loads/stores
P4 JDK-8354650 [PPC64] Try to reduce register definitions
P4 JDK-8374744 Enable dumping of APX EGPRs (R16–R31) in JVM fatal error logs
P4 JDK-8371792 Refactor barrier loop tests out of TestIfMinMax
P4 JDK-8367531 Template Framework: use scopes and tokens instead of misbehaving immediate-return-queries
P4 JDK-8359412 Template-Framework Library: Operations and Expressions
P4 JDK-8358772 Template-Framework Library: Primitive Types
P4 JDK-8358600 Template-Framework Library: Template for TestFramework test class
P4 JDK-8325482 Test that distinct seeds produce distinct traces for compiler stress flags
P5 JDK-8378888 jdk/incubator/vector/Float16OperationsBenchmark.java uses wrong package name
P5 JDK-8370489 Some compiler tests miss the @key randomness
P5 JDK-8344345 test/hotspot/gtest/x86/x86-asmtest.py has trailing whitespaces

hotspot/gc

Priority Bug Summary
P4 JDK-8367722 [GenShen] ShenandoahEvacuationStats is always empty
P4 JDK-8364927 Add @requires annotation to TestReclaimStringsLeaksMemory.java
P4 JDK-8319326 GC: Make TestParallelRefProc use createTestJavaProcessBuilder
P4 JDK-8319540 GC: Make TestSelectDefaultGC use createTestJavaProcessBuilder
P4 JDK-8367708 GenShen: Reduce total evacuation burden
P4 JDK-8367451 GenShen: Remove the option to compute age census during evacuation
P4 JDK-8378561 Mark gc/shenandoah/compiler/TestLinkToNativeRBP.java as /native
P4 JDK-8367450 Shenandoah: Log the composition of the collection set
P4 JDK-8367473 Shenandoah: Make the detailed evacuation metrics a runtime diagnostic option
P4 JDK-8361726 Shenandoah: More detailed evacuation instrumentation

hotspot/jfr

Priority Bug Summary
P3 JDK-8367949 JFR: MethodTrace double-counts methods that catch their own exceptions
P3 JDK-8380011 Path-to-gcroots search should not trigger stack overflows
P4 JDK-8279196 Test: jdk/jfr/event/gc/stacktrace/TestG1OldAllocationPendingStackTrace.java timed out
P4 JDK-8377949 TestZRelocationSetEvent.java intermittent fails OOME

hotspot/jvmti

Priority Bug Summary
P4 JDK-8368159 Significant performance overhead when started with jdwp agent and unattached debugger
P5 JDK-8321687 Test vmTestbase/nsk/jvmti/scenarios/contention/TC03/tc03t002/TestDescription.java failed: JVMTI_ERROR_THREAD_NOT_ALIVE

hotspot/runtime

Priority Bug Summary
P2 JDK-8380474 Crash SEGV in ThreadIdTable::lazy_initialize after JDK-8323792
P4 JDK-8377932 AOT cache is not rejected when JAR file has changed
P4 JDK-8376402 Dependencies::print_statistics() and AbstractClassHierarchyWalker::print_statistics() are not called from PRODUCT code
P4 JDK-8369683 Exclude runtime/Monitor/MonitorWithDeadObjectTest.java#DumpThreadsBeforeDetach on Alpine Linux debug
P4 JDK-8374998 Failing os::write - remove bad file
P4 JDK-8374343 Fix SIGSEGV when lib/modules is unreadable
P4 JDK-8372272 Hotspot shared lib loading - add load attempts to Events::log
P4 JDK-8363949 Incorrect jtreg header in MonitorWithDeadObjectTest.java
P4 JDK-8372380 Make hs_err reporting more robust for unattached threads
P4 JDK-8367485 os::physical_memory is broken in 32-bit JVMs when running on 64-bit OSes
P4 JDK-8357086 os::xxx functions returning memory size should return size_t
P4 JDK-8374769 PPC: MASM::pop_cont_fastpath() should reset _cont_fastpath if SP == _cont_fastpath

hotspot/svc

Priority Bug Summary
P4 JDK-8323792 ThreadSnapshot::initialize can cause assert in Thread::check_for_dangling_thread_pointer (possibility of dangling Thread pointer)

hotspot/test

Priority Bug Summary
P4 JDK-8378810 Enable missing FFM test via jtreg requires for RISC-V
P4 JDK-8379464 Enable missing stack walking test via jtreg requires for RISC-V

infrastructure

Priority Bug Summary
P4 JDK-8378774 Bump update version for OpenJDK: jdk-25.0.4

infrastructure/build

Priority Bug Summary
P4 JDK-8371893 [macOS] use dead_strip linker option to reduce binary size
P4 JDK-8379416 AIX build fails if system (not GNU) date tool is in PATH
P4 JDK-8376684 Compile OpenJDK in headless mode without required X11 libraries
P4 JDK-8378836 Enable linktime-gc by default on Linux ppc64le
P4 JDK-8341735 Rewrite the build/AbsPathsInImage.java test to not load the entire file at once
P4 JDK-8379202 Support linktime-gc on Linux with clang

security-libs/java.security

Priority Bug Summary
P4 JDK-8373690 Unexpected Keystore message using jdk.crypto.disabledAlgorithms

security-libs/javax.crypto

Priority Bug Summary
P2 JDK-8347938 Add Support for the Latest ML-KEM and ML-DSA Private Key Encodings

security-libs/jdk.security

Priority Bug Summary
P4 JDK-8367096 jdk/open/test/jdk/sun/security/pkcs11/ rsa, ec, config, secmod and sslecc tests are skipping but showing as pass
P4 JDK-8368524 Tests are skipped and shown as passed in test/jdk/sun/security/pkcs11/Cipher/KeyWrap

xml/jaxp

Priority Bug Summary
P4 JDK-8364315 Remove unused xml files from test/jaxp/javax/xml/jaxp/functional/javax/xml/transform/xmlfiles