技术 2023年6月9日 星期五
本文罗列了自OpenJDK 10以来各个版本的功能特性,便于追踪某些JEP跨越多个版本的孵化、预览进程。本文将不定期更新,以跟进最新的JEP计划,历史版本不会被保留。
下表中的后缀#
代表“孵化”(Incubator),后缀*
代表“预览”(Preview)。后缀符号的数量代表孵化/预览的次数,如**
代表“第二次预览”(Second Preview)。
Feature | JDK 10 | 11 (LTS) | 12 | 13 | 14 | 15 | 16 | 17 (LTS) | 18 | 19 | 20 | 21 (LTS) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Scoped Values | 446* | |||||||||||
Structured Concurrency | 453* | |||||||||||
Key Encapsulation Mechanism API | 452 | |||||||||||
Prepare to Disallow the Dynamic Loading of Agents | 451 | |||||||||||
Deprecate the Windows 32-bit x86 Port for Removal | 449 | |||||||||||
Unnamed Classes and Instance Main Methods | 445* | |||||||||||
Unnamed Patterns and Variables | 443* | |||||||||||
Generational ZGC | 439 | |||||||||||
Sequenced Collections | 431 | |||||||||||
String Templates | 430* | |||||||||||
Scoped Values | 429# | |||||||||||
Structured Concurrency | 428# | 437## | ||||||||||
Virtual Threads | 425* | 436** | 444 | |||||||||
Linux/RISC-V Port | 422 | |||||||||||
Record Patterns | 405* | 432** | 440 | |||||||||
Deprecate Finalization for Removal | 421 | |||||||||||
Internet-Address Resolution SPI | 418 | |||||||||||
Reimplement Core Reflection with Method Handles | 416 | |||||||||||
Code Snippets in Java API Documentation | 413 | |||||||||||
Simple Web Server | 408 | |||||||||||
UTF-8 by Default | 400 | |||||||||||
Context-Specific Deserialization Filters | 415 | |||||||||||
Foreign Function & Memory API | 412# | 419## | 424* | 434** | 442*** | |||||||
Deprecate the Security Manager for Removal | 411 | |||||||||||
Remove the Experimental AOT and JIT Compiler | 410 | |||||||||||
Pattern Matching for switch | 406* | 420** | 427*** | 433**** | 441 | |||||||
Strongly Encapsulate JDK Internals | 403 | |||||||||||
Deprecate the Applet API for Removal | 398 | |||||||||||
macOS/AArch64 Port | 391 | |||||||||||
New macOS Rendering Pipeline | 382 | |||||||||||
Enhanced Pseudo-Random Number Generators | 356 | |||||||||||
Restore Always-Strict Floating-Point Semantics | 306 | |||||||||||
Strongly Encapsulate JDK Internals by Default | 396 | |||||||||||
Warnings for Value-Based Classes | 390 | |||||||||||
Foreign Linker API (Incubator) | 389# | |||||||||||
Windows/AArch64 Port | 388 | |||||||||||
Elastic Metaspace | 387 | |||||||||||
Alpine Linux Port | 386 | |||||||||||
Unix-Domain Socket Channels | 380 | |||||||||||
ZGC: Concurrent Thread-Stack Processing | 376 | |||||||||||
Migrate to GitHub | 369 | |||||||||||
Migrate from Mercurial to Git | 357 | |||||||||||
Enable C++14 Language Features | 347 | |||||||||||
Vector API | 338# | 414## | 417### | 426#### | 438##### | 448###### | ||||||
Deprecate & Remove RMI Activation for Removal | 385 | 407 | ||||||||||
Disable and Deprecate Biased Locking | 374 | |||||||||||
Reimplement the Legacy DatagramSocket API | 373 | |||||||||||
Remove the Nashorn JavaScript Engine | 372 | |||||||||||
Hidden Classes | 371 | |||||||||||
Sealed Classes | 360* | 397** | 409 | |||||||||
Edwards-Curve Digital Signature Algorithm (EdDSA) | 339 | |||||||||||
Records | 359* | 384** | 395 | |||||||||
Foreign-Memory Access API | 370# | 383## | 393### | |||||||||
Remove the Pack200 Tools and API | 367 | |||||||||||
Deprecate the ParallelScavenge + SerialOld GC Combination | 366 | |||||||||||
ZGC on Windows | 365 | |||||||||||
ZGC on macOS | 364 | |||||||||||
Remove the Concurrent Mark Sweep (CMS) Garbage Collector | 363 | |||||||||||
Deprecate & Remove the Solaris and SPARC Ports | 362 | 381 | ||||||||||
Helpful NullPointerExceptions | 358 | |||||||||||
Non-Volatile Mapped Byte Buffers | 352 | |||||||||||
JFR Event Streaming | 349 | |||||||||||
NUMA-Aware Memory Allocation for G1 | 345 | |||||||||||
Packaging Tool | 343# | 392 | ||||||||||
Pattern Matching for instanceof | 305* | 375** | 394 | |||||||||
Text Blocks | 355* | 368** | 378 | |||||||||
Reimplement the Legacy Socket API | 353 | |||||||||||
ZGC: Uncommit Unused Memory | 351 | |||||||||||
Dynamic CDS Archives | 350 | |||||||||||
Promptly Return Unused Committed Memory from G1 | 346 | |||||||||||
Abortable Mixed Collections for G1 | 344 | |||||||||||
Default CDS Archives | 341 | |||||||||||
One AArch64 Port, Not Two | 340 | |||||||||||
JVM Constants API | 334 | |||||||||||
Switch Expressions | 325* | 354** | 361 | |||||||||
Microbenchmark Suite | 230 | |||||||||||
Shenandoah: A Low-Pause-Time Garbage Collector | 189 | 379 | ||||||||||
Deprecate the Pack200 Tools and API | 336 | |||||||||||
Deprecate the Nashorn JavaScript Engine | 335 | |||||||||||
ZGC: A Scalable Low-Latency Garbage Collector | 333 | 377 | ||||||||||
Transport Layer Security (TLS) 1.3 | 332 | |||||||||||
Low-Overhead Heap Profiling | 331 | |||||||||||
Launch Single-File Source-Code Programs | 330 | |||||||||||
ChaCha20 and Poly1305 Cryptographic Algorithms | 329 | |||||||||||
Flight Recorder | 328 | |||||||||||
Unicode 10 | 327 | |||||||||||
Key Agreement with Curve25519 and Curve448 | 324 | |||||||||||
Local-Variable Syntax for Lambda Parameters | 323 | |||||||||||
HTTP Client (Standard) | 321 | |||||||||||
Remove the Java EE and CORBA Modules | 320 | |||||||||||
Epsilon: A No-Op Garbage Collector | 318 | |||||||||||
Improve Aarch64 Intrinsics | 315 | |||||||||||
Dynamic Class-File Constants | 309 | |||||||||||
Nest-Based Access Control | 181 | |||||||||||
Time-Based Release Versioning | 322 | |||||||||||
Root Certificates | 319 | |||||||||||
Experimental Java-Based JIT Compiler | 317 | |||||||||||
Heap Allocation on Alternative Memory Devices | 316 | |||||||||||
Additional Unicode Language-Tag Extensions | 314 | |||||||||||
Remove the Native-Header Generation Tool (javah) | 313 | |||||||||||
Thread-Local Handshakes | 312 | |||||||||||
Application Class-Data Sharing | 310 | |||||||||||
Parallel Full GC for G1 | 307 | |||||||||||
Garbage-Collector Interface | 304 | |||||||||||
Consolidate the JDK Forest into a Single Repository | 296 | |||||||||||
Local-Variable Type Inference | 286 |