Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Java 25, Nuevas características

Java 25, Nuevas características

JConf Peru 2025
Java 25, Nuevas características por Aurelio Garcia Ribeyro

Revisaremos las nuevas características publicadas en el JDK 25, desde mejoras en el lenguaje, pasando por librerías de seguridad, monitoreo y performance.

Avatar for Carlos Zela Bueno

Carlos Zela Bueno

December 04, 2025
Tweet

More Decks by Carlos Zela Bueno

Other Decks in Programming

Transcript

  1. New in JDK 25 I read all the JEPs so

    you don't have to Aurelio Garcia-Ribeyro Senior Director of Product Management Java Platform Group – Oracle September 2025
  2. 2 Copyright © 2025, Oracle and/or its affiliates 2020 2019

    2021 2022 2024 2023 2026 2028 2029 2030 2031 2032 2033 2025 2027 2018 8 11 LTS 17 LTS 21 LTS 22 23 24 25 LTS 26 27 28 2025-09-16 Oracle JDK Releases for customers 29 LTS
  3. 3 Copyright © 2025, Oracle and/or its affiliates 2020 2019

    2021 2022 2024 2023 2026 2028 2029 2030 2031 2032 2033 2025 2027 2018 8 11 LTS 17 LTS 21 LTS 22 23 24 25 LTS 26 27 28 Free Use Java License Free for dev and personal use; Subscription or OCI for production 2025-09-16 Oracle JDK Releases for everyone else 29 LTS
  4. Largest Features (JEPs) in JDK 25 Copyright © 2025, Oracle

    and/or its affiliates 4 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Libraries Compact Object Headers [519] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Leyden
  5. Primitive Types in Patterns, instanceof, and switch (3rd Preview) JEP

    507 Enhance pattern matching by allowing primitive types in all pattern contexts, and extend instanceof and switch to work with all primitive types. 6 Copyright © 2025, Oracle and/or its affiliates
  6. Pattern Matching for switch 7 Copyright © 2025, Oracle and/or

    its affiliates switch (x.getStatus()) { case 0 -> "okay"; case 1 -> "warning"; case 2 -> "error"; default -> "unknown status: " + x.getStatus(); }
  7. Pattern Matching for switch 8 Copyright © 2025, Oracle and/or

    its affiliates switch (x.getStatus()) { case 0 -> "okay"; case 1 -> "warning"; case 2 -> "error"; case int i -> "unknown status: " + i; }
  8. Pattern Matching for switch 9 Copyright © 2025, Oracle and/or

    its affiliates switch (x.getYearlyFlights()) { case 0 -> … ; case 1 -> … ; case 2 -> issueDiscount(); case int i when i >= 100 -> issueGoldCard(); case int i -> ... appropriate action when i > 2 && i < 100 ...; }
  9. Pattern Matching for instanceof if (i >= -128 && i

    <= 127) { byte b = (byte)i; ... b ... } 10 Copyright © 2025, Oracle and/or its affiliates
  10. Pattern Matching for instanceof if (i instanceof byte b) {

    ... b ... } // if i doesn't "fit" in a byte // there is no cast 11 Copyright © 2025, Oracle and/or its affiliates
  11. Module Import Declarations JEP 511 Ability to succinctly import all

    of the packages exported by a module. Some classes (such as Object, String, and Comparable) are essential to every Java Program so the compiler imports them all as demand as if every source file had import java.lang.*; at the beginning. Newer classes such as List, Map, Stream, and Path are almost as essential, but there is no automatic import… and require several imports. This feature makes it possible to import all these newer classes with a single import statement. 12 Copyright © 2025, Oracle and/or its affiliates
  12. Module Import Declarations String[] fruits = new String[] { "apple",

    "berry", "citrus" }; Map<String, String> m = Stream.of(fruits) .collect(Collectors.toMap(s ->s.toUpperCase().substring(0,1), Function.identity())); 13 Copyright © 2025, Oracle and/or its affiliates
  13. Module Import Declarations String[] fruits = new String[] { "apple",

    "berry", "citrus" }; Map<String, String> m = Stream.of(fruits) .collect(Collectors.toMap(s ->s.toUpperCase().substring(0,1), Function.identity())); 14 Copyright © 2025, Oracle and/or its affiliates import java.util.Map; // or import java.util.*; import java.util.function.Function; // or import java.util.function.*; import java.util.stream.Collectors; // or import java.util.stream.*; import java.util.stream.Stream; // (can be removed)
  14. But since JDK 9 … we have modules 15 Copyright

    © 2025, Oracle and/or its affiliates Which group related packages
  15. Module Import Declarations 16 Copyright © 2025, Oracle and/or its

    affiliates import java.io.*; import java.lang.*; import java.lang.annotation.*; import java.lang.constant.*; import java.lang.foreign.*; import java.lang.invoke.*; import java.lang.module.*; import java.lang.ref.*; import java.lang.reflect.*; import java.lang.runtime.*; import java.math.*; import java.net.*; import java.net.spi.*; import java.nio.*; import java.nio.channels.*; import java.nio.channels.spi.*; import java.nio.charset.*; import java.nio.charset.spi.*; import java.nio.file.*; import java.nio.file.attribute.*; import java.nio.file.spi.*; import java.security.*; import java.security.cert.*; import java.security.interfaces.*; import java.security.spec.*; import java.text.*; import java.text.spi.*; import java.time.*; import java.time.chrono.*; import java.time.format.*; import java.time.temporal.*; import java.time.zone.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.concurrent.locks.*; import java.util.function.*; import java.util.jar.*; import java.util.random.*; import java.util.regex.*; import java.util.spi.*; import java.util.stream.*; import java.util.zip.*; import javax.crypto.*; import javax.crypto.interfaces.*; import javax.crypto.spec.*; import javax.net.*; import javax.net.ssl.*; import javax.security.auth.*; import javax.security.auth.callback.*; import javax.security.auth.login.*; import javax.security.auth.spi.*; import javax.security.auth.x500.*; import javax.security.cert.*; Or
  16. Ambiguous Imports import module java.desktop; Element e = ... //

    javax.swing.text.Element (interface) 18 Copyright © 2025, Oracle and/or its affiliates // or // javax.swing.text.html.parser.Element (class)
  17. Ambiguous Imports import module java.desktop; Element e = ... //

    javax.swing.text.Element (interface) 19 Copyright © 2025, Oracle and/or its affiliates import javax.swing.text.Element; //ambiguity resolved!
  18. Compact Source Files and Instance Main Methods JEP 512 Evolve

    the Java programming language so that beginners can write their first programs without needing to understand language features designed for large programs. Far from using a separate dialect of the language, beginners can write streamlined declarations for single-class programs and then seamlessly expand their programs to use more advanced features as their skills grow. 20 Copyright © 2025, Oracle and/or its affiliates
  19. Simple Source Files and Instance Main Methods My first Java

    program public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } 21 Copyright © 2025, Oracle and/or its affiliates Class declaration and public access modifier Parameters to interface with OS's shell static modifier is part of class-and-object model "Ignore all of this… you will understand it later" Importing basic utility classes
  20. Allow main methods to omit public, static, and String[] args

    My first Java program class HelloWorld { void main() { System.out.println("Hello, World!"); } } 22 Copyright © 2025, Oracle and/or its affiliates
  21. Simple source file without class declaration My Java first program

    void main() { System.out.println("Hello, World!"); } 23 Copyright © 2025, Oracle and/or its affiliates
  22. New class: java.lang.IO My Java first program void main() {

    IO.println("Hello, World!"); } 24 Copyright © 2025, Oracle and/or its affiliates
  23. Automatically import module.base My Java first program import module.base void

    main() { IO.println("Hello, World!"); } 25 Copyright © 2025, Oracle and/or its affiliates //This statement is implied. Not actually in the code.
  24. Automatically import most common classes and interfaces My Java first

    program void main() { IO.println("Hello, World!"); } 26 Copyright © 2025, Oracle and/or its affiliates //These statements are implied. // Not actually in the code. import java.io.*; import java.lang.*; import java.lang.annotation.*; import java.lang.constant.*; import java.lang.foreign.*; import java.lang.invoke.*; import java.lang.module.*; import java.lang.ref.*; import java.lang.reflect.*; import java.lang.runtime.*; import java.math.*; import java.net.*; import java.net.spi.*; import java.nio.*; import java.nio.channels.*; import java.nio.channels.spi.*; import java.nio.charset.*; import java.nio.charset.spi.*; import java.nio.file.*; import java.nio.file.attribute.*; import java.nio.file.spi.*; import java.security.*; import java.security.cert.*; import java.security.interfaces.*; import java.security.spec.*; import java.text.*; import java.text.spi.*; import java.time.*; import java.time.chrono.*; import java.time.format.*; import java.time.temporal.*; import java.time.zone.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.concurrent.locks.*; import java.util.function.*; import java.util.jar.*; import java.util.random.*; import java.util.regex.*; import java.util.spi.*; import java.util.stream.*; import java.util.zip.*; import javax.crypto.*; import javax.crypto.interfaces.*; import javax.crypto.spec.*; import javax.net.*; import javax.net.ssl.*; import javax.security.auth.*; import javax.security.auth.callback.*; import javax.security.auth.login.*; import javax.security.auth.spi.*; import javax.security.auth.x500.*; import javax.security.cert.*;
  25. Flexible Constructor Bodies JEP 513 In the body of a

    constructor, allow statements to appear before an explicit constructor invocation, i.e., super(...) or this(...). Such statements cannot reference the object under construction, but they can initialize its fields and perform other safe computations 27 Copyright © 2025, Oracle and/or its affiliates
  26. Flexible Constructor Bodies Validating constructor arguments 28 Copyright © 2025,

    Oracle and/or its affiliates public class PositiveBigInteger extends BigInteger { public PositiveBigInteger(long value) { } } super(value); if (value <= 0) throw new IllegalArgumentException("non-positive value"); // Potentially unnecessary work… but must be first
  27. Flexible Constructor Bodies Validating constructor arguments 29 Copyright © 2025,

    Oracle and/or its affiliates public class PositiveBigInteger extends BigInteger { public PositiveBigInteger(long value) { } } super(value); if (value <= 0) throw new IllegalArgumentException("non-positive value");
  28. Flexible Constructor Bodies Preparing superclass constructor arguments 30 Copyright ©

    2025, Oracle and/or its affiliates public Sub(Certificate certificate) var publicKey = certificate.getPublicKey(); if (publicKey == null) throw ... byte[] certBytes = switch (publicKey) { case RSAKey rsaKey -> ... case DSAPublicKey dsaKey -> ... default -> ... }; super(certBytes); } Doesn't have to be the first line!
  29. Structured Concurrency (5th Preview) JEP 505 Structured concurrency treats groups

    of related tasks running in different threads as single units of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability. The concurrent analogue to structured programming • When execution splits to multiple concurrent flows, they should rejoin in the same code-block • Simple idea, with profound implications • Many of the hardest things to do get easier (cancellation, shutdown) 32 Copyright © 2025, Oracle and/or its affiliates
  30. Scoped Values JEP 506 Enable a method to share immutable

    data both with its callees within a thread, and with child threads. • Easier to reason about than thread-local variables • Lower space and time costs • Especially useful when used together with virtual threads and structured concurrency. 33 Copyright © 2025, Oracle and/or its affiliates
  31. Stable Values (Preview) JEP 502 Introduce an API for stable

    values, which are objects that hold immutable data. Stable values are treated as constants by the JVM, enabling the same performance optimizations that are enabled by declaring a field final. Compared to final fields, however, stable values offer greater flexibility as to the timing of their initialization. A stable value must be initialized some time before its content is first retrieved, and it is immutable thereafter. 34 Copyright © 2025, Oracle and/or its affiliates
  32. Stable Values Without stable values we must resort to final

    fields class OrderController { private final Logger logger = Logger.create(OrderController.class); void submitOrder(User user, List<Product> products) { logger.info("order started"); ... logger.info("order submitted"); } } 35 Copyright © 2025, Oracle and/or its affiliates \\Since logger is final, it must be initialized eagerly \\when an instance of OrderController is created.
  33. Stable Values With stable values we gain lazy initialization while

    maintaining immutability class OrderController { private final StableValue<Logger> logger = StableValue.of(); Logger getLogger() { return logger.orElseSet(() -> Logger.create(OrderController.class)); } void submitOrder(User user, List<Product> products) { logger.info("order started"); ... logger.info("order submitted"); } } 36 Copyright © 2025, Oracle and/or its affiliates
  34. Vector API (10th Incubator) JEP 508 Express vector computations that

    reliably compile at runtime to optimal vector instructions on supported CPUs, thus achieving performance superior to equivalent scalar computations. Portable across hardware supporting different vector sizes. On platforms without vectors, graceful degradation will yield code competitive with manually-unrolled loops 37 Copyright © 2025, Oracle and/or its affiliates
  35. Key Derivation Function API JEP 510 Key Derivation Functions (KDFs)

    are cryptographic algorithms for deriving additional keys from a secret key and other data. 39 Copyright © 2025, Oracle and/or its affiliates
  36. Sample Key Derivation Function 1) Start with a password or

    passphrase laptop-mirror-signal 2) Add a cryptographic salt (aka a random number), in this case a 256 bit in hex laptop-mirror-signal63e0fc4b9d4efd0a630eb8c9b3ec561a34397fb48c77e8fd1abf0022bce39eb5 3) Calculate the sha256 checksum of the concatenated value: dffa680584193fffbda2cb31ff538b32f9739308ae006c32ed92d3bb753a1df2 4) Use the output of step 3 and calculate the checksum again. Repeat this step 100,000 (min recommended by NIST) to tens of millions of times … this takes a while… … just a little longer….. 40 Copyright © 2025, Oracle and/or its affiliates 43bebbb5bd91654e4c5bf8aadbec1d32a2e678d73cb52ee4db91a72ca6dc3db3 (with salt 63e0fc4b9d4efd0a630eb8c9b3ec561a34397fb48c77e8fd1abf0022bce39eb5 and 500k hash iterations )
  37. PEM Encodings of Cryptographic Objects (Preview) JEP 470 API for

    encoding objects that represent cryptographic keys, certificates, and certificate revocation lists into the widely-used Privacy-Enhanced Mail (PEM) transport format, and for decoding from that format back into objects. This is a preview API. One new interface and three new classes in the java.security package: • DEREncodable interface • PEMEncoder and PEMDecoder classes • PEMRecord class, which implements DEREncodable, is for encoding and decoding PEM texts 41 Copyright © 2025, Oracle and/or its affiliates example of a PEM-encoded cryptographic object, in this case an elliptic curve public key. -----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEi/kRGOL7wCPTN4KJ2ppeSt5UYB6u cPjjuKDtFTXbguOIFDdZ65O/8HTUqS/sVzRF+dg7H3/tkQ/36KdtuADbwQ== -----END PUBLIC KEY-----
  38. Compact Object Headers JEP 519 Reduce the size of object

    headers in the HotSpot JVM from between 96 and 128 bits down to 64 bits on 64-bit architectures. This will reduce heap usage, improve deployment density, and increase data locality. When enabled (it's disabled by default in JDK 25), this feature, • Must reduce the object header size to 64 bits (8 bytes) on the target 64-bit platforms (x64 and AArch64), • Should reduce object sizes and memory footprint on realistic workloads, • Should not introduce more than 5% throughput or latency overheads on the target 64-bit platforms, and only in infrequent cases, and • Should not introduce measurable throughput or latency overheads on non-target 64-bit platforms. 43 Copyright © 2025, Oracle and/or its affiliates
  39. From Project Leyden Improving startup, time to peak performance, and

    footprint of Java Progams Image generated with : chatgtp
  40. Ahead-of-Time Command-Line Ergonomics JEP 514 Make it easier to create

    ahead-of-time caches, which accelerate the startup of Java applications, by simplifying the commands required for common use cases. 45 Copyright © 2025, Oracle and/or its affiliates
  41. Ahead-of-Time As it was in the old times (that is

    in JDK 24) 46 Copyright © 2025, Oracle and/or its affiliates 1 ) Training Run records an AOT Configuration file 2) Use the configuration file to create an AOT Cache file 3) Runt the app with the AOT Cache file 2.5) Delete the no longer need configuration file $ java -XX:AOTMode=record -XX:AOTConfiguration=app.aotconf \ -cp app.jar com.example.App ... $ java -XX:AOTMode=create -XX:AOTConfiguration=app.aotconf \ -XX:AOTCache=app.aot Subsequently, run the application specifying just the AOT cache: $ java -XX:AOTCache=app.aot -cp app.jar com.example.App ... $ rm app.aotconf
  42. Ahead-of-Time Simplified flow with JDK 25 47 Copyright © 2025,

    Oracle and/or its affiliates 1 ) Training and creation in a single run 2) Runt the app with the AOT Cache file $ java -XX:AOTCacheOutput=app.aot \ -cp app.jar com.example.App ... Subsequently, run the application specifying just the AOT cache: $ java -XX:AOTCache=app.aot -cp app.jar com.example.App ...
  43. Ahead-of-Time Method Profiling JEP 515 Improve warmup time by making

    method-execution profiles from a previous run of an application instantly available, when the HotSpot Java Virtual Machine starts. This will enable the JIT compiler to generate native code immediately upon application startup, rather than having to wait for profiles to be collected. 48 Copyright © 2025, Oracle and/or its affiliates
  44. JFR CPU-Time Profiling (Experimental) JEP 509 Enhance the JDK Flight

    Recorder (JFR) to capture more accurate CPU-time profiling information on Linux. The ability to accurately and precisely measure CPU-cycle consumption was added to the Linux kernel in version 2.6.12 via a timer that emits signals at fixed intervals of CPU time rather than fixed intervals of elapsed real time. JFR will use Linux's CPU-timer mechanism to sample the stack of every thread running Java code at fixed intervals of CPU time. Each such sample is recorded in a new type of event, jdk.CPUTimeSample 50 Copyright © 2025, Oracle and/or its affiliates
  45. JFR Cooperative Sampling JEP 518 Improve the stability of the

    JDK Flight Recorder (JFR) when it asynchronously samples Java thread stacks. Achieve this by walking call stacks only at safepoints, while minimizing safepoint bias. This approach works well when the target thread is running Java code, whether interpreted or compiled, but not when the target thread is running native code. In that case, we continue to use the previous approach. 51 Copyright © 2025, Oracle and/or its affiliates
  46. JFR Method Timing & Tracing JEP 520 Extend JDK Flight

    Recorder (JFR) with facilities for method timing and tracing via bytecode instrumentation. Tracing the flow of code from one method to another, and timing how long each method takes to run, can help to identify performance bottlenecks, optimize code, and find the root causes of bugs. For example, if a method is changed to fix a performance bug, timing its execution can confirm that the fix was successful. If an application fails because it runs out of database connections, tracing the method that opens connections can suggest how to manage those connections more effectively. 52 Copyright © 2025, Oracle and/or its affiliates
  47. JFR Method Timing & Tracing Developers sometimes trace and time

    methods by adding temporary log statements to the methods under investigation, but this is cumbersome at best, and not feasible for third-party libraries or classes in the JDK. In JDK 25, JDK Flight Recorder emits events that trace how a method was called and how long it takes it run. For example, if an application suffers from slow startup, timing the execution of all static initializers might suggest where lazy initialization could be used. $ java '-XX:StartFlightRecording:method-timing=::<clinit>,filename=clinit.jfr' \ -jar ... $ jfr view method-timing clinit.jfr 53 Copyright © 2025, Oracle and/or its affiliates
  48. From OpenJDK 25 Remove the 32-bit [Linux] x86 Port: JEP

    503 • Oracle stopped offering 32-bit Linux runtimes with JDK 9 in 2017 Generational Shenandoah: JEP 521 • Oracle JDK offers ZGC as the low-latency garbage collector and does not include Shenandoah 55 Copyright © 2025, Oracle and/or its affiliates
  49. And don't forget the release notes… New Features New getChars(int,

    int, char[], int) Method in CharSequence and CharBuffer (JDK-8343110) Add Standard System Property stdin.encoding (JDK-8350703) New Methods on BodyHandlers and BodySubscribers to Limit the Number of Response Body Bytes Accepted by the HttpClient (JDK-8328919) New connectionLabel Method in java.net.http.HttpResponse to Identify Connections (JDK-8350279) New Property to Construct ZIP FileSystem as Read-only (JDK-8350880) Updates to ForkJoinPool and CompletableFuture (JDK-8319447) java.util.zip.Inflater and java.util.zip.Deflater Enhanced To Implement AutoCloseable (JDK-8225763) Thread Dumps Generated by HotSpotDiagnosticMXBean.dumpThreads and jcmd Thread.dump_to_file Updated to Include Lock Information (JDK-8356870) G1 Reduces Remembered Set Overhead by Grouping Regions into Shared Card Sets (JDK-8343782) New JFR Annotation for Contextual Information (JDK-8356698) UseCompactObjectHeaders Is a Product Option (JDK-8350457) Turn on Timestamp and Thread Details by Default for java.security.debug (JDK-8350689) SHAKE128-256 and SHAKE256-512 as MessageDigest Algorithms (JDK-8354305) Support for HKDF in SunPKCS11 (JDK-8328119) Mechanism to Disable Signature Schemes Based on Their TLS Scope (JDK-8349583) Add Support for TLS Keying Material Exporters to JSSE and SunJSSE Provider (JDK-8341346) Update XML Security for Java to 3.0.5 (JDK-8344137) Enhanced jar File Validation (JDK-8345431) Removed Features and Options java.net.Socket Constructors Can No Longer Be Used to Create a Datagram Socket (JDK-8356154) Removal of Old JMX System Properties (JDK-8344966, JDK-8344969, JDK-8344976, JDK-8345045, JDK-8345048, JDK-8345049) Removal of PerfData Sampling (JDK-8241678) Removal of sun.rt._sync* Performance Counters (JDK-8348829) Removed Baltimore CyberTrust Root Certificate After Expiry Date (JDK-8303770) Removed Two Camerfirma Root Certificates (JDK-8350498) Removal of SunPKCS11 Provider's PBE-related SecretKeyFactory Implementations (JDK-8348732) Deprecated Features and Options Deprecate VFORK Launch Mechanism from Process Implementation (linux) (JDK-8357179) Deprecate the Use of java.locale.useOldISOCodes System Property (JDK-8353118) Deprecate XML Interchange in JMX DescriptorSupport for Removal (JDK-8347433) The UseCompressedClassPointers Option is Deprecated (JDK-8350753) Various Permission Classes Deprecated for Removal (JDK-8348967, JDK-8347985, JDK-8351224, JDK- 8351310, JDK-8353641, JDK-8353642, JDK-8353856) Notable Issues Resolved CodeModel Now Delivers Custom and Unknown Attributes (JDK-8347472) Japanese Imperial Calendar Exception Change for Era too Large (JDK-8350646) No More OutOfMemoryErrors Due to JNI in Serial/Parallel GC (JDK-8192647) G1 Reduces Pause Time Spikes by Improving Region Selection (JDK-8351405) ZGC Now Avoids String Deduplication for Short-Lived Strings (JDK-8347337) Class Files Provided With The JVMTI ClassFileLoadHook Event Are Verified (JDK-8351654) Known Issues Regression in Serialization of LocalDate Class Objects (JDK-8367031) Performance Regression in java.lang.ClassValue::get (JDK-8358535) -XX:+UseTransparentHugePages Fails to Enable Huge Pages for G1 (JDK-8366434) Other Notes JDK Provided Instances of ICC_Profile Cannot Be Modified (JDK-8346465) Removal of No-Argument Constructor for BasicSliderUI() (JDK-8334581) Default Console Implementation No Longer Based On JLine (JDK-8351435) java.io.File.delete No Longer Deletes Read-only Files on Windows (JDK-8355954) File Operations with Directory or File Names Ending in a Space Now Consistently Fail on Windows (JDK-8354450) java.io.File Treats the Empty Pathname As the Current User Directory (JDK-8024695) Relax String Creation Requirements in StringBuilder and StringBuffer (JDK-8138614) Method BigDecimal.sqrt() Might Now Throw on Powers of 100 and Huge Precisions (JDK-8341402) FTP Fallback for Non-Local File URLs Is Disabled by Default (JDK-8353440) The jwebserver Tool -d Command Line Option Now Accepts Directories Specified With a Relative Path (JDK-8355360) Networking Exception Messages can be Filtered to Remove Sensitive Information (JDK-8348986) java.net.http.HttpClient is Enhanced to Reject Responses with Prohibited Headers (JDK-8354276) The Default Thread Pool Used for Asynchronous Channel Operations Now Uses Innocuous Threads (JDK-8345432) Added API Note on Validating Signers to the getCertificates and getCodeSigners Methods of JarEntry and JarURLConnection (JDK-8347946) Changes to the Default Time Zone Detection on Debian-based Linux (JDK-8345213) Support for CLDR Version 47 (JDK-8346948) JarInputStream Treats Signed JARs with Multiple Manifests As Unsigned (JDK-8337494 (not public)) JAR Files on Classpath Are Never Modified by javac (JDK-8338675) MontgomeryIntegerPolynomialP256 Multiply Intrinsic with AVX2 on x86_64 (JDK-8350459) ZGC: Enhanced Methods for Dealing With Fragmentation (JDK-8350441) Information About Metaspace Has Been Moved Away from Heap Logging (JDK-8356848) Socket, File, and Exception Events for JFR Are Throttled by Default (JDK-8351594) NotifyFramePop Should Return JVMTI_ERROR_DUPLICATE (JDK-8346460) Compact Object Headers CDS Archive Generation and jlink Instruction (JDK-8350457) Use systemd Instead of init for jexec (JDK-8355072 (not public)) Added 4 New Root Certificates from Sectigo Limited (JDK-8359170) Added TLSv1.3 and CNSA 1.0 Algorithms to Implementation Requirements (JDK-8283795) ML-DSA Performance Improved (JDK-8351034, JDK-8348561) Compatible OCSP readtimeout Property with OCSP Timeout (JDK-8347506) SunJCE Provider's PBE-related SecretKeyFactory Implementations Enhanced with Unicode Support (JDK-8348732) ML-KEM Performance Improved (JDK-8351412, JDK-8349721) Disabled SHA-1 in TLS/DTLS 1.2 Handshake Signatures (JDK-8340321) Inner Classes Must Not Have null as their Immediately Enclosing Instance (JDK-8164714) javac Mishandles Supplementary Character in Character Literal (JDK-8354908) -Xprint Output Includes Type Variable Bounds and Annotated Object Supertypes (JDK-8356057) The javac Compiler Should Not Accept a Lambda Expression Type to Be a Class (JDK-8322810) The -Xlint:none Compiler Flag No Longer Implies -nowarn (JDK-8352612) Hide Superclasses from Conditionally Exported Packages (JDK-8254622) Whitespace Normalization in Traditional Documentation Comments (JDK-8352249) Syntax Highlighting for Code Fragments (JDK-8348282) Keyboard Navigation (JDK-8350638) jpackage No Longer Includes Service Bindings by Default for Generated Run-Time Images (JDK- 8345185) Streamline XPath API's Extension Function Control (JDK-8354084) Corrected Error Handling for XMLStreamReader (JDK-8327378) 56 Copyright © 2025, Oracle and/or its affiliates
  50. 57 Copyright © 2025, Oracle and/or its affiliates 2020 2019

    2021 2022 2024 2023 2026 2028 2029 2030 2031 2032 2033 2025 2027 2018 8 11 LTS 17 LTS 21 LTS 22 23 24 25 LTS 26 27 28 2025-09-16 Oracle JDK Releases 29 LTS
  51. 58 Copyright © 2025, Oracle and/or its affiliates 2020 2019

    2021 2022 2024 2023 2026 2028 2029 2030 2031 2032 2033 2025 2027 2018 8 11 LTS 17 LTS 21 LTS 22 23 24 25 LTS 26 27 28 2025-09-16 Oracle JDK Releases 29 LTS with LTS blinders on
  52. New in JDK 25 Copyright © 2025, Oracle and/or its

    affiliates 59 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Libraries Compact Object Headers [519] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Leyden
  53. New in JDK 25 Copyright © 2025, Oracle and/or its

    affiliates | Confidential: Restricted 60 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] (JDK 22) Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] (JDK 24) Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] (JDK 24) Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] (JDK 22) Class File API [484] (JDK 24) Stream Gatherers [485] (JDK 24) Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] (JDK 23. 24) Region Pinning for G1 [423] (JDK 22) Late Barrier Expansion for G1 [475] (JDK 24) Synchronize Virtual Threads without Pinning [491] (JDK 24) Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] (JDK 23) Leyden Markdown Documentation Comments [467] (JDK 23) Launch Multi-File Source-Code Programs [458] (JDK 22) Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] (JDK 24) Permanently Disable the Security Manager [486] (JDK 24) Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498] (JDK 24) for those coming from JDK 21
  54. Easier to learn Java Copyright © 2025, Oracle and/or its

    affiliates | Confidential: Restricted 61 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  55. Easier to write Applications Copyright © 2025, Oracle and/or its

    affiliates | Confidential: Restricted 62 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  56. Better Performance on Garbage Collection Copyright © 2025, Oracle and/or

    its affiliates | Confidential: Restricted 63 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  57. Better Performance at runtime (opt in for now) Copyright ©

    2025, Oracle and/or its affiliates | Confidential: Restricted 64 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  58. Leyden: Improve startup, time to peak performance, and footprint Copyright

    © 2025, Oracle and/or its affiliates | Confidential: Restricted 65 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  59. Concurrency Improvements Copyright © 2025, Oracle and/or its affiliates |

    Confidential: Restricted 66 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  60. Better Profiling Copyright © 2025, Oracle and/or its affiliates |

    Confidential: Restricted 67 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  61. Remove Bottlenecks in Platform Development Copyright © 2025, Oracle and/or

    its affiliates | Confidential: Restricted 68 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  62. Informed consent for "no-guardrails" Copyright © 2025, Oracle and/or its

    affiliates | Confidential: Restricted 69 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  63. Tighten Security - Post Quantum Algorithms Copyright © 2025, Oracle

    and/or its affiliates | Confidential: Restricted 70 Primitive Types in Patterns, instanceof, and switch 3rd Preview [507] Module Import Declarations [511] Compact Source Files and Instance Main Methods [512] Flexible Constructor Bodies [513] Unnamed Variables & Patterns [456] Language Key Derivation Function API [510] PEM Encodings of Cryptographic Objects Preview [470] Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism [496] Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm [497] Security Libraries JFR CPU-Time Profiling Experimental [509] JFR Cooperative Sampling [518] JFR Method Timing & Tracing [520] Monitoring Structured Concurrency 5th Preview [505] Scoped Values [506] Stable Values Preview [502] Vector API 10th Incubator [508] Foreign Function & Memory API [454] Class File API [484] Stream Gatherers [485] Libraries Compact Object Headers [519] ZGC: [only] Generational Mode [474,490] Region Pinning for G1 [423] Late Barrier Expansion for G1 [475] Synchronize Virtual Threads without Pinning [491] Performance Ahead-of-Time Command-Line Ergonomics [514] Ahead-of-Time Method Profiling [515] Ahead-of-Time Class Loading & Linking [483] Leyden Markdown Documentation Comments [467] Launch Multi-File Source-Code Programs [458] Tools Future Removal and Restrictions Prepare to Restrict the Use of JNI [472] Permanently Disable the Security Manager [486] Warn upon Use of Memory-Access Methods in sun.misc.Unsafe [498]
  64. 73 • Experiential and educational format • Java + relevant

    complementary technologies • Sessions are ~45% core JDK team + Oracle, ~55% Java ecosystem + Sponsors • Meet the Java Architects from Oracle's team • Livestreaming JDK 26 Launch and keynotes • Record all learning sessions for on-demand replay on youtube.com/java Core Tenants