跳到主要内容

JDK 15 新特性概览

JEP 339: Edwards-Curve Digital Signature Algorithm (EdDSA)

Implement cryptographic signatures using the Edwards-Curve Digital Signature Algorithm (EdDSA) as described by RFC 8032.

JEP 339: 爱德华曲线数字签名算法 (EdDSA)

实现使用爱德华曲线数字签名算法 (EdDSA) 的加密签名,如RFC 8032所述。

JEP 360: Sealed Classes (Preview)

Enhance the Java programming language with sealed classes and interfaces. Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them. This is a preview language feature in JDK 15.

JEP 360: 密封类(预览)

通过 密封类和接口 来增强Java编程语言。密封类和接口限制哪些其他类或接口可以扩展或实现它们。这是JDK 15中的一个预览语言特性

JEP 371: Hidden Classes

Introduce hidden classes, which are classes that cannot be used directly by the bytecode of other classes. Hidden classes are intended for use by frameworks that generate classes at run time and use them indirectly, via reflection. A hidden class may be defined as a member of an access control nest, and may be unloaded independently of other classes.

JEP 371: 隐藏类

引入 隐藏类,这些类不能被其他类的字节码直接使用。隐藏类旨在供在运行时生成类并通过反射间接使用的框架使用。隐藏类可以作为 访问控制嵌套 的成员定义,并且可以独立于其他类被卸载。

JEP 372: Remove the Nashorn JavaScript Engine

Remove the Nashorn JavaScript script engine and APIs, and the jjs tool. The engine, the APIs, and the tool were deprecated for removal in Java 11 with the express intent to remove them in a future release.

JEP 372: 移除Nashorn JavaScript引擎

移除Nashorn JavaScript脚本引擎和API,以及jjs工具。该引擎、API和工具在Java 11中被标记为待移除,明确意图在未来的版本中将其移除。

JEP 373: Reimplement the Legacy DatagramSocket API

Replace the underlying implementations of the java.net.DatagramSocket and java.net.MulticastSocket APIs with simpler and more modern implementations that are easy to maintain and debug. The new implementations will be easy to adapt to work with virtual threads, currently being explored in Project Loom. This is a follow-on to JEP 353, which already reimplemented the legacy Socket API.

JEP 373: 重新实现遗留的 DatagramSocket API

用更简单、更现代的实现替换 java.net.DatagramSocketjava.net.MulticastSocket API 的底层实现,这些实现易于维护和调试。新的实现将易于适应与正在探索的虚拟线程一起工作,Project Loom。这是对 JEP 353 的后续工作,该工作已经重新实现了遗留的 Socket API。

JEP 374: Deprecate and Disable Biased Locking

Disable biased locking by default, and deprecate all related command-line options.

JEP 374: 弃用并禁用偏向锁

默认禁用偏向锁,并弃用所有相关的命令行选项。

JEP 375: Pattern Matching for instanceof (Second Preview)

Enhance the Java programming language with pattern matching for the instanceof operator. Pattern matching allows common logic in a program, namely the conditional extraction of components from objects, to be expressed more concisely and safely. This is a preview language feature in JDK 15.

JEP 375: instanceof的模式匹配(第二次预览)

通过为 instanceof 操作符增强 Java 编程语言的 模式匹配 功能。模式匹配 允许程序中常见的逻辑,即从对象中有条件地提取组件,以更简洁和安全的方式表达。这是 JDK 15 中的一个 预览语言特性

JEP 377: ZGC: A Scalable Low-Latency Garbage Collector (Production)

Change the Z Garbage Collector from an experimental feature into a product feature.

JEP 377: ZGC: 可扩展的低延迟垃圾收集器(生产)

将 Z 垃圾收集器从实验特性转变为产品特性。

JEP 378: Text Blocks

Add text blocks to the Java language. A text block is a multi-line string literal that avoids the need for most escape sequences, automatically formats the string in a predictable way, and gives the developer control over the format when desired.

JEP 378: 文本块

向Java语言添加_文本块_。文本块是一个多行字符串字面量,避免了大多数转义序列的需要,自动以可预测的方式格式化字符串,并在需要时给予开发者对格式的控制。

JEP 379: Shenandoah: A Low-Pause-Time Garbage Collector (Production)

Change the Shenandoah garbage collector from an experimental feature into a product feature.

JEP 379: Shenandoah: 低暂停时间垃圾收集器(生产)

将Shenandoah垃圾收集器从实验特性转变为产品特性。

JEP 381: Remove the Solaris and SPARC Ports

Remove the source code and build support for the Solaris/SPARC, Solaris/x64, and Linux/SPARC ports. These ports were deprecated for removal in JDK 14 with the express intent to remove them in a future release.

JEP 381: 移除Solaris和SPARC端口

移除Solaris/SPARC、Solaris/x64和Linux/SPARC端口的源代码和构建支持。这些端口在JDK 14中已被弃用以便移除,明确意图在未来的版本中将其移除。

JEP 383: Foreign-Memory Access API (Second Incubator)

Introduce an API to allow Java programs to safely and efficiently access foreign memory outside of the Java heap.

JEP 383: 外部内存访问API(第二次孵化)

引入一个API,允许Java程序安全高效地访问Java堆外的外部内存。

JEP 384: Records (Second Preview)

Enhance the Java programming language with records, which are classes that act as transparent carriers for immutable data. Records can be thought of as nominal tuples. This is a preview language feature in JDK 15.

JEP 384: 记录(第二次预览)

增强Java编程语言,添加记录,它是作为不可变数据的透明载体的类。记录可以被视为_命名元组_。这是JDK 15中的一个预览语言特性

JEP 385: Deprecate RMI Activation for Removal

Deprecate the RMI Activation mechanism for future removal. RMI Activation is an obsolete part of RMI that has been optional since Java 8. No other part of RMI will be deprecated.

JEP 385: 废弃RMI激活以便移除

废弃RMI激活机制以便未来移除。RMI激活是RMI的一个过时部分,自Java 8以来一直是可选的。RMI的其他部分将不会被废弃。