Scroll Top

Java 19 is Released

java 19 release

The Java 19 has been release on 20-September-2022 with non Long-Term-Support (LTS), premier support ends on March 2023. Java 19 delivers performance, security and stability improvements along with enhancements to the platform that helps improving developers productivity.

In this article we see high level overview of the Java 19 new release new features, removals and deprecation.

1. Highlights & Significant Changes

Below are the most significant features delivered.

  1. JEP 405: Record Patterns (Preview) – To deconstruct record values, JDK 19 extends record patterns to the Java programming language .  Enable s a powerful, declarative, and composable form of data navigation and processing by nesting Record Patterns and Type patterns.
  2. JEP 422: Linux/RISC-V Port – RISC-V is a free and Open RISC Instruction Set Architecture. The Linux/RISC-V port would only support the RV64GV configuration of RISC-V, a general purpose 64-bit ISA that includes vector instructions. The developers of Java may consider other RISC-V configurations in the future. With the increasing availability of RISC-V hardware, a port of the JDK would be valuable.
  3. JEP 424: Foreign Function & Memory API (Preview) – Provides an API (FFM API) that enables java programs access to native memory (memory not managed by JVM/ out side Java heap) and access to native code (eg: C/C++ libraries) directly from Java.
  4. JEP 425: Virtual Threads (Preview) – Dramatically reduces the effort of writing, maintaining, and observing high-throughput concurrent applications by introducing lightweight virtual threads to the Java Platform.
  5. JEP 426: Vector API (Fourth Incubator) – Enables superior performance compared to equivalent scalar computations by expressing vector computations that reliably compile at runtime to vector instructions on supported CPU architectures. The Vector API aims to improve the situation by providing a way to write complex vector algorithms in Java, using the existing HotSpot auto-vectorizer but with a user model which makes vectorization far more predictable and robust. Hand-coded vector loops can express high-performance algorithms, such as vectorized hashCode or specialized array comparisons, which an auto-vectorizer may never optimize. Numerous domains can benefit from this explicit vector API including machine learning, linear algebra, cryptography, finance, and code within the JDK itself
  6. JEP 427: Pattern Matching for switch (Third Preview) – Enables pattern matching for switch expressions and statements by permitting an expression to be tested against a number of patterns. This allows users to express complex data-oriented queries concisely and safely.
  7. JEP 428: Structured Concurrency (Incubator) – Simplify multi threaded 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.

2. Removed Features & Options

Below are the mainly removed features in the new Java 19 release.

  1. Finalizer Implementation in SSLSocketImpl (JDK-8212136) – The finalizer implementation in SSLSocket has been removed, with the underlying native resource releases now done by the Socket implementation.
  2. Diagnostic Flag GCParallelVerificationEnabled (JDK-8286304) – The diagnostic flag GCParallelVerificationEnabled has been removed.

3. Deprecated Features

Below are the mainly deprecated features and options.

  1. java.lang.ThreadGroup Is degraded (JDK-8284161)
  2. Deprecation of Locale Class Constructors (JDK-8282819)
  3. PSSParameterSpec(int) Constructor and DEFAULT Static Constant Are Deprecated (JDK-8254935)
  4. OAEPParameterSpec.DEFAULT Static Constant Is Deprecated (JDK-8284553)

4. Conclusion

In this article, we briefly discussed about the Java 19 latest release.

5. References

  1. Open JDk release Notes
  2. Oracle Release announcement