“我用Java 8”已成过去式,Java 25正式发布:Oracle提供八年更新、18项新功能上线
OracleOracle(US:ORCL) 3 6 Ke·2025-09-17 12:10

Core Insights - Oracle has released Java 25, which is the latest Long-Term Support (LTS) version, following JDK 21 released in September 2023. JDK 25 will receive at least 8 years of Oracle Premier commercial support, with quarterly updates until September 2028 under the NFTC license, transitioning to OTN license thereafter until at least September 2033 [1][2]. Feature Updates - Java 25 introduces 18 new features, with 5 specifically aimed at enhancing AI development [4]. - Language improvements include the third preview of pattern matching for primitive types, allowing developers to operate directly on primitive types, and a new module import declaration to simplify imports [5]. - The JDK 25 library updates include structured concurrency entering its fifth preview, allowing management of related concurrent tasks as a whole, and the stabilization of scoped values for sharing immutable data across threads [6]. Security and Performance Enhancements - New security features include a simplified API for PEM encoding and a Key Derivation Function API, which supports algorithms for deriving new keys from existing ones, crucial for future quantum computing security [8]. - Performance improvements include the introduction of compact object headers, reducing the object header size from 96 bits to 64 bits, and enhancements to JDK Flight Recorder for more precise CPU time analysis [9][10]. Garbage Collection and Support Changes - The Generational Shenandoah garbage collector has been upgraded from experimental to a formal feature, aimed at improving throughput and memory utilization under high load [11]. - JDK 25 officially removes support for 32-bit x86, allowing the OpenJDK community to focus on new features and optimizations [12]. Market Reception - Despite the release of Java 25, Java 17 remains the most widely used version, with Java 21 following closely. The future adoption of Java 25 as a primary version will depend on its acceptance over time [13].