跳到主要内容

JDK 19 新特性概览

JEP 405: Record Patterns (Preview)

Enhance the Java programming language with record patterns to deconstruct record values. Record patterns and type patterns can be nested to enable a powerful, declarative, and composable form of data navigation and processing. This is a preview language feature.

JEP 405: 记录模式 (预览)

通过引入 记录模式 来增强 Java 编程语言,以解构记录值。记录模式和类型模式可以嵌套,从而实现强大、声明式和可组合的数据导航和处理形式。这是一个 预览语言特性

JEP 422: Linux/RISC-V Port

Port the JDK to Linux/RISC-V.

JEP 422: Linux/RISC-V 移植

将 JDK 移植到 Linux/RISC-V。

JEP 424: Foreign Function & Memory API (Preview)

Introduce an API by which Java programs can interoperate with code and data outside of the Java runtime. By efficiently invoking foreign functions (i.e., code outside the JVM), and by safely accessing foreign memory (i.e., memory not managed by the JVM), the API enables Java programs to call native libraries and process native data without the brittleness and danger of JNI. This is a preview API.

JEP 424: 外部函数与内存API(预览)

引入一个API,使Java程序能够与Java运行时之外的代码和数据进行互操作。通过高效调用外部函数(即JVM外的代码)和安全访问外部内存(即JVM未管理的内存),该API使Java程序能够调用本地库并处理本地数据,而无需JNI的脆弱性和危险性。这是一个预览API

JEP 425: Virtual Threads (Preview)

Introduce virtual threads to the Java Platform. Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications. This is a preview API.

JEP 425: 虚拟线程(预览)

在Java平台中引入_虚拟线程_。虚拟线程是轻量级线程,显著减少了编写、维护和观察高吞吐量并发应用程序的工作量。这是一个预览API

JEP 426: Vector API (Fourth Incubator)

Introduce an API to express vector computations that reliably compile at runtime to optimal vector instructions on supported CPU architectures, thus achieving performance superior to equivalent scalar computations.

JEP 426: 向量API(第四次孵化)

引入一个API,用于表达向量计算,能够在运行时可靠地编译为在支持的CPU架构上最优的向量指令,从而实现比等效标量计算更优的性能。

JEP 427: Pattern Matching for switch (Third Preview)

Enhance the Java programming language with pattern matching for switch expressions and statements. Extending pattern matching to switch allows an expression to be tested against a number of patterns, each with a specific action, so that complex data-oriented queries can be expressed concisely and safely. This is a preview language feature.

JEP 427: switch 的模式匹配(第三次预览)

通过为 switch 表达式和语句增强 Java 编程语言的模式匹配。将模式匹配扩展到 switch 允许表达式与多个模式进行测试,每个模式都有特定的动作,从而可以简洁且安全地表达复杂的数据导向查询。这是一个 预览语言特性

JEP 428: Structured Concurrency (Incubator)

Simplify multithreaded programming by introducing an API for structured concurrency. Structured concurrency treats multiple tasks running in different threads as a single unit of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability. This is an incubating API.

JEP 428: 结构化并发(孵化器)

通过引入一个用于_结构化并发_的API,简化多线程编程。结构化并发将多个在不同线程中运行的任务视为一个单一的工作单元,从而简化错误处理和取消,提高可靠性,并增强可观察性。这是一个孵化API