JDK 19: The new features in Java 19

ByElizabeth J. Bohn

Jun 2, 2022 #2021 Acura Rdx Technology Package, #2021 Acura Tlx Technology Package, #2022 Acura Mdx Technology Package, #Align Technology Stock, #Applied Racing Technology, #Artificial Intelligence Technology Solutions Inc, #Assisted Reproductive Technology, #Battery Technology Stocks, #Benjamin Franklin Institute Of Technology, #Chief Technology Officer, #Color Star Technology, #Craft Design Technology, #Definition Of Technology, #Definitive Technology Speakers, #Element Materials Technology, #Health Information Technology Salary, #Ice Mortgage Technology, #Information Technology Definition, #Information Technology Degree, #Information Technology Salary, #Interactive Response Technology, #International Game Technology, #La Crosse Technology Weather Station, #Lacrosse Technology Atomic Clock, #Luokung Technology Stock, #Marvell Technology Stock Price, #Maytag Commercial Technology Washer, #Microchip Technology Stock, #Micron Technology Stock Price, #Mrna Technology History, #Mrna Vaccine Technology, #Nyc College Of Technology, #Penn College Of Technology, #Recombinant Dna Technology, #Rlx Technology Stock, #Robert Half Technology, #Science And Technology, #Sharif University Of Technology, #Smart Home Technology, #Stevens Institute Of Technology Ranking, #Symphony Technology Group, #Technology In The Classroom, #Technology Readiness Level, #Technology Stores Near Me, #Thaddeus Stevens College Of Technology, #University Of Advancing Technology, #Vanguard Information Technology Etf, #Vanguard Technology Etf, #What Is 5g Technology, #Women In Technology


Java Growth Kit 19, due this September, has just experienced a seventh function proposed for it: structured concurrency, to simplify multithreaded programming. Structured concurrency joins 6 earlier options like history patterns, a preview of a international purpose and memory API, and aid for the open up supply Linux/RISC-V instruction set architecture (ISA).

JDK 19, or only Java 19, potentially could host a wide selection of attributes, ranging from universal generics to benefit objects, in accordance to ideas underway for enhancing Java. JDK 19 would follow JDK 18, which arrived March 22. Regular Java is on a 6-thirty day period release cadence.

OpenJDK’s builders have posted an official release plan for JDK 19, which has it arriving September 20 as a generation release, preceded by rampdown phases June 9 and July 21, and release candidates to be printed August 11 and August 25.

Early accessibility builds of JDK 19 can be accessed from jdk.java.internet/19. Proposed JDK 19 features incorporate:

  • Structured concurrency, in an incubator period, is meant to simplify multithreaded programming by a structured concurrency library. This concurrency treats numerous responsibilities running in unique threads as a single unit of work, to streamline error managing and cancellation. Dependability and observability are improved.
  • A preview of record styles, to deconstruct record values. Report styles and type patterns can be nested to allow a declarative, powerful, and composable form of info navigation and processing. Plans of the proposal contain extending pattern matching to convey extra sophisticated, composable info queries though not transforming the syntax or semantics of sort patterns. This proposal builds on sample matching for instanceof, shipped in JDK 16  in March 2021. Potential designs may possibly simply call for history patterns to be extended with capabilities these as array designs and vararg patterns. File designs is section of Challenge Amber, an effort to examine and incubate more compact, efficiency-oriented Java features.
  • A preview of a foreign operate and memory API, which would introduce an API by which Java packages can interoperate with code and facts outside the Java runtime. By successfully invoking overseas capabilities (i.e., code outside the house the Java runtime) and safely accessing international memory (i.e., memory not managed by the JVM) the API permits Java plans to phone indigenous libraries and course of action indigenous knowledge devoid of the risk and brittleness of the Java Indigenous Interface (JNI). The overseas operate and memory API brings together two previously incubating APIs: the foreign memory obtain API and the foreign linker API. The international perform and memory API was beforehand incubated in JDK 17 and reincubated in JDK 18. The proposal’s plans incorporate ease of use, efficiency, generality, and basic safety.
  • A preview of digital threads, which are lightweight threads that considerably reduce the hard work of composing, keeping, and observing substantial-throughput, concurrent apps. Plans involve enabling server apps written in the simple thread-for each-request fashion to scale with in close proximity to-optimum components utilization, enabling current code that uses the java.lang Thread API to adopt virtual threads with small adjust, and permit troubleshooting, debugging, and profiling of virtual threads with present JDK instruments. It is not a target of this proposal to change the fundamental concurrency design in Java or provide a new data parallelism assemble in either the Java language or Java libraries. Nor is it a intention to clear away the conventional implementation of threads or to silently migrate present applications to use virtual threads.
  • A third preview of sample matching for change expressions and statements, extending pattern matching to swap, to allow for an expression to be tested from a range of patterns, each with a distinct motion, so intricate details-oriented queries can be expressed concisely and safely and securely. This ability formerly was previewed in JDK 17 and JDK 18. The third preview would add refinements including the alternative of guarded styles with when clauses in switch blocks. Also, the runtime semantics of a sample switch when the value of the selector expression is null are much more intently aligned with legacy change semantics. The plan’s objectives include things like growing the expressiveness and applicability of change expressions and statements by letting patterns to look in circumstance labels. Other targets include letting builders to relax the historic null-hostility of change when sought after, increasing the safety of swap statements and ensuring that current swap expressions and statements carry on to compile with no changes and execute with equivalent semantics.
  • A fourth incubation of a vector API that would express vector computations that reliably compile at runtime to best vector guidelines on supported CPU architectures, consequently obtaining performance exceptional to equivalent scalar computations. Developers employing the API gain a way to create intricate vector algorithms in Java, making use of the HotSpot auto-vectorizer but with a user design that makes vectorizations more predictable and sturdy. The vector API earlier was incubated into JDK 16, JDK 17, and JDK 19.
    Improvements to the API proposed for JDK 19 contain enhancements to load and keep vectors to and from MemorySegments, as described by the Foreign Function and Memory API preview. JDK 19 would also increase two cross-lane vector functions, compress and increase, alongside one another with a complementary vector mask compress procedure. The compress vector procedure maps lanes of a supply vector, selected by a mask, to a location vector in lane get, even though the expand operation does the inverse. The compress operation is handy in filtering question outcomes.
    In a different addition to the vector API, bitwise integral lanewise functions would be expanded, together with operations these counting the number of a single bits, reversing the get of bits, and compressing and growing bits. Goals of the API integrated getting obvious and concise, platform-agnostic, acquiring reliable runtime and compilation general performance on x64 and AArch64 architectures, and enabling “sleek” degradation, for scenarios in which a vector computation simply cannot be fully expressed at runtime as a sequence of vector operations.
  • With the Linux/RISC-V port, Java would acquire aid for a hardware instruction set that is already supported by a huge vary of language toolchains. RISC-V essentially is a loved ones of linked ISAs. The Linux/RISC-V port would only assist the RV64GV configuration of RISC-V, a common objective 64-bit ISA that features vector directions. The builders of Java could take into consideration other RISC-V configurations in the potential.

The port would guidance the following HotSpot VM possibilities: the template interpreter, C1 (customer) JIT compiler, C2 (server) JIT compiler, and all recent mainline rubbish collectors like ZGC and Shenandoah. The genuine porting is practically total the concentration of the JDK Improvement Proposal (JEP) is integration of the port into the JDK mainline repository.

Like JDK 18, JDK 19 is thanks to be a limited-time period launch, with only 6 months of best-degree, Premier guidance.

The preceding release, JDK 17, was a Very long Expression Assistance (LTS) launch, with several years of help. It arrived September 14, 2021.

Copyright © 2022 IDG Communications, Inc.


Source website link