The Java Development Kit 19, due in September, already has five features officially proposed for it. Three recent additions, an API for external function and memory, virtual threads and pattern matching (all visualizations), join two previously cited functions, a vector API (in the fourth incubation) and a JDK port to open source Linux / RISC -V instruction set architecture (ISA).

JDK 19, or simply Java 19, could potentially host a huge number of features ranging from universal generics to valuable objects, according to plans to improve Java. JDK 19 will follow JDK 18, which arrived on March 22. Standard Java has a six-month release rate.

OpenJDK developers have released an official release schedule for JDK 19, which arrives on September 20 as a production version, preceded by downsizing phases on June 9 and July 21, and release candidates, which will be released on August 11 and August 25.

You can access the early access compilations of JDK 19 jdk.java.net/19. The suggested features of JDK 19 include:

  • Visualization of a External function and memory API, which will introduce an API through which Java programs can interact with code and data outside of the Java runtime environment. By efficiently invoking third-party functions (ie, code outside the Java runtime environment) and securely accessing external memory (ie, non-JVM-managed memory), the API allows Java programs to call their own libraries and to process own data without danger and fragility of Java Innate Interface (JNI). The External Function and Memory API combines two earlier incubation APIs, the Foreign Memory Access API and the Foreign Linker API. The API for foreign function and memory was previously incubated in JDK 17 and re-incubated in JDK 18. The objectives of the proposal include ease of use, performance, summary and safety.
  • Preview of virtual threadswhich are lightweight threads that drastically reduce the effort of writing, maintaining, and monitoring concurrent high-performance applications. Objectives include allowing server applications written in a simple query thread style to scale with near-optimal hardware utilization, allowing existing code that uses the java.lang Thread API to accept virtual threads with minimal modification and troubleshooting , debugging and profiling virtual threads with existing JDK tools. The purpose of this proposal is not to change the basic model of parallelism in Java or to propose a new construction for data parallelism in either the Java language or the Java libraries. Neither is the goal of eliminating traditional thread deployments or silently migrating existing applications to use virtual threads.
  • Third review of matching patterns for switching expressions and expressionsby extending pattern matching to a switch to allow an expression to be tested against a number of models, each with a specific action, so that complex data-driven queries can be expressed concisely and securely. This feature was previously visualized in JDK 17 and JDK 18. The third review will add refinement, including replacing protected templates with when clauses in switching blocks. Also, the semantics during the execution of a pattern switch, when the value of the selector expression is zero, is more closely aligned with the inherited semantics of the switch. The objectives of the plan include expanding the expressiveness and applicability of switching expressions and expressions by allowing templates to appear in case labels, allowing the historical zero hostility of the switch to be granted when desired, increasing the security of switching expressions and ensuring that the existing switch operator expressions and expressions continue to compile unchanged and execute with identical semantics.
  • Fourth incubation of a vector API which would express vector calculations that reliably compile at runtime to optimal vector instructions of supported CPU architectures, thus achieving performance better than equivalent scalar calculations. Developers using the API get a way to write complex vector algorithms in Java using the automatic HotSpot vectorizer, but with a user model that makes vectorization more predictable and stable. The vector API was previously incubated in JDK 16, JDK 17 and JDK 19.
    The API enhancements proposed for JDK 19 include enhancements for loading and storing vectors to and from MemorySegments as defined by the external function preview and memory API. JDK 19 will also add two cross-band vector operations, compression and expansion, along with an additional vector mask compression operation. The vector compression operation maps the bands of the source vector selected by the mask to the destination vector in the bar row, while the expansion operation does the opposite. The compression operation is useful for filtering query results.
    In another addition to the vector API, bit-by-bit integral operations will be extended, including operations such as counting the number of bits, reversing the order of bits, and compressing and expanding bits. The objectives of the API include to be clear and concise, platform-independent, to have reliable performance during execution and compilation of x64 and AArch64 architectures, and to allow “fine” degradation for situations where vector computing cannot to be fully expressed during execution as a sequence of vector operations.
  • With the Linux / RISC-V port, Java will receive support for a hardware set of instructions, which is already supported by a wide range of language tool chains. RISC-V is actually a family of related ISAs. The Linux / RISC-V port will only support the RV64GV configuration of RISC-V, a 64-bit general-purpose ISA that includes vector instructions. Java developers may consider other RISC-V configurations in the future.

The port will support the following HotSpot VM options: template interpreter, C1 (client) JIT compiler, C2 (server) JIT compiler, and all current major garbage collectors, including ZGC and Shenandoah. The actual transfer is almost complete; The focus of the JDK Improvement Proposal (JEP) is to integrate the port into the main JDK repository.

Like JDK 18, JDK 19 should be a short-term edition, with only six months at the highest level, Prime Minister supports.

Copyright © 2022 IDG Communications, Inc.

https://www.infoworld.com/article/3653331/jdk-19-the-features-targeted-for-java-19.html#tk.rss_all

Previous articleDell Technologies expands the multi-cloud experience
Next articleThe parent company of Facebook Meta announces plans to delay the lease