Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bienvenido Java 21 [ES]

Bienvenido Java 21 [ES]

This presentation was made to welcome Java 21 in Spanish and presented at Peru JUG.

We give a brief review of how Java was changed in its release strategy over time and the features added by different LTS until reaching JDK 21.

1. Feature releases.
2. Features from JDK 11 to JDK 17.
3. Java 21 not is JDK 21.
4. JEP management.
5. JEPs released in JDK 21

Enjoy!

Carlos Zela Bueno

September 29, 2023
Tweet

More Decks by Carlos Zela Bueno

Other Decks in Programming

Transcript

  1. Nos gusta conocer gente nueva….únete Peru Java User Group Peru

    JUG es la comunidad oficial de Lima, Perú de habla hispana
  2. Feature Release Cadencia de lanzamiento cada 6 meses Fuente: https://inside.java/2023/09/19/the-arrival-of-java-21/

    Desde 1995 1.0, 1.1, 1.2, 1.2.2, 1.3, 1.3.1, 1.4, 1.4.1, Java 5, Java 6, 6u2…6u25 Java 7, 7u2…7u40 Java 8, 8u20..8u60 Java 9……… major.minor.patch major.minor.patch - update/perf/cpu @c_zela
  3. Features desde JDK 11 – JDK 17 De LTS a

    LTS Java 12 2019-03 Shenandoah: A Low-Pause-Time Garbage Collector Microbenchmark Suite Switch Expressions (Preview) JVM Constants API Default CDS Archives Abortable Mixed Collections for G1 Promptly Return Unused Committed Memory from G1 One AArch64 Port, Not Two Java 13 2019-09 Dynamic CDS Archives ZGC: Uncommit Unused Memory Reimplement the Legacy Socket API Switch Expressions (Preview) Text Blocks (Preview) Java 14 2020-03 Pattern Matching for instanceof (Preview) Packaging Tool (Incubator) NUMA-Aware Memory Allocation for G1 JFR Event Streaming Non-Volatile Mapped Byte Buffers Helpful NullPointerExceptions Records (Preview) Switch Expressions Deprecate the Solaris and SPARC Ports Remove the Concurrent Mark Sweep (CMS) Garbage Collector Deprecate the ParallelScavenge + SerialOld GC Combination ZGC on macOS ZGC on Windows Remove the Pack200 Tools and API Text Blocks (Preview) Foreign-Memory Access API (Incubator) Java 15 2020-09 Edwards-Curve Digital Signature Algorithm (EdDSA) Sealed Classes (Preview) Hidden Classes Remove the Nashorn JavaScript Engine Reimplement the Legacy DatagramSocket API Disable and Deprecate Biased Locking Pattern Matching for instanceof (Preview) ZGC: A Scalable Low-Latency Garbage Collector Text Blocks Shenandoah: A Low-Pause-Time Garbage Collector Remove the Solaris and SPARC Ports Foreign-Memory Access API (Incubator) Records (Preview) Deprecate RMI Activation for Removal Java 16 2021-03 Vector API (Incubator) Enable C++14 Language Features Migrate from Mercurial to Git Migrate to GitHub ZGC: Concurrent Thread-Stack Processing Unix-Domain Socket Channels Alpine Linux Port Elastic Metaspace Windows/AArch64 Port Foreign Linker API (Incubator) Warnings for Value-Based Classes Packaging Tool Foreign-Memory Access API ( Incubator) Pattern Matching for instanceof Records Strongly Encapsulate JDK Internals by Default Sealed Classes (Preview) Java 17 2021-09 Restore Always-Strict Floating-Point Semantics Enhanced Pseudo-Random Number Generators New macOS Rendering Pipeline macOS/AArch64 Port Deprecate the Applet API for Removal Strongly Encapsulate JDK Internals Pattern Matching for switch (Preview) Remove RMI Activation Sealed Classes Deprecate the Security Manager for Removal Foreign Function & Memory API (Incubator) Vector API (Incubator) Context-Specific Deserialization Filters openjdk.java.net @c_zela
  4. Java 21 ≠ JDK 21 Java Platform, Standard Edition 21

    - JSR 396 No es código. Es un conjunto de especificaciones que define el comportamiento de la plataforma de java, lenguajes, VM, APIs, etc. Java Development Kit 21 https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz https://download.oracle.com/java/21/latest/jdk-21_macos-x64_bin.dmg https://download.oracle.com/java/21/latest/jdk-21_windows-x64_bin.exe https://openjdk.org/projects/jdk/21/spec/ LTS @c_zela
  5. JEP - JDK Enhancement Proposal • JEPs son agrupados en

    diferentes proyectos • Loom: Escalar masivamente threads ligeros, haciendo que la simultaneidad vuelva a ser simple de usar. • Amber: Mejorar la productividad del lenguaje de programación, sintaxis, etc. • Valhala: Brindar mayor densidad de memoria, mejor rendimiento de las aplicaciones de ML y big. • Panama: Brindar alto rendimiento con una creación más sencilla de aplicaciones intensivas de E/S. • Leyden: Mejorar el tiempo de arranque, tiempos de respuesta en picos de rendimientos y el footprint de aplicaciones Java. • Core/JDK/HotSpot • JEPs son implementados por la comunidad en el OpenJDK y agregados al siguiente release: • En el tiempo están en 3 estados: Incubator, Preview y Final (GA). @c_zela
  6. Estado de los JEPs Incubator Preview Final • API puede

    cambiar • Puede desaparecer en futuros reléase y ser reemplazado por otro JEP. • Necesita ser habilitado. No disponible por default. • Cerca a ser final • No se aceptan mas cambios • Sera incluido en futuro releases • Ya habilitados y pueden ser probados –enable-preview • Completado • Comunidad puede reportar bug-fixes y su corrección son priorizados. • En GA @c_zela
  7. JEPs lanzados en el JDK 21 Amber Loom Panama •

    JEP 430: String Templates (Preview) • JEP 440: Record Patterns • JEP 441: Pattern Matching for switch • JEP 443: Unnamed Patterns and Variables (Preview) • JEP 445: Unnamed Classes and Instance Main Methods (Preview) Core libs / Perf • JEP 444: Virtual Threads • JEP 446: Scoped Values (Preview) • JEP 453: Structured Concurrency (Preview) • JEP 442: Foreign Function & Memory API (3rd Preview) • JEP 448: Vector API (6th Incubator) • JEP 453: Structured Concurrency (Preview) • JEP 431: Sequenced Collections • JEP 439: Generational ZGC • JEP 452: Key Encapsulation Mechanism API @c_zela