Can you keep up with Java updates?

While developers are stuck with Java 8, there is new news about the next release, Java 16, which, like Java 15, is a short-term release that Oracle only supports for six months.

According to the release schedule, JDK 16 will enter the Rampdown phase on December 10 and January 14, 2021, and the release candidate phase from February 4 to February 18, 2021. The final version is expected to be released on March 16, 2021.

JDK 16 has revealed upcoming features, and here’s a sneak peek:

  • The previously previewed sealed classes and interfaces in JDK 15 limit how other classes and interfaces can extend or implement them. The goals of the initiative include allowing the author of a class or interface to control the code responsible for implementing it, providing more declarative ways to restrict the use of superclasses than access modifiers, and supporting the future direction of pattern matching by providing a basis for pattern analysis.

  • By default, strong encapsulation is done internally within the JDK, except for key internal apis such as misc.unsafe. Users can opt for the loose strong encapsulation that has been the default since JDK 9. The goals of this recommendation include improving the security and maintainability of the JDK as part of project Jigsaw, and encouraging developers to move from using internal elements to using standard apis so that both developers and end users can easily update to future Java releases.

  • External linker API that provides statically typed, pure Java access to native code. This API will be in the incubator stage in JDK 16.

  • Move ZGC (Z garbage collector) thread stack processing from the safe point to the concurrent phase. The goals of this plan include removing thread stack processing from the ZGC safety point.

  • Flexible meta-space capabilities, which will more quickly return unused HotSpot VM class metadata (meta-space) memory back to the operating system, reducing the meta-space footprint and simplifying the meta-space code to reduce maintenance costs.

  • Enable C++ 14 language features that allow the use of C++ 14 features in JDK C++ source code and provide specific guidance on some of the features available for HotSpot VM code.

  • Vector API for the incubator phase, where the JDK will install an incubator module for representing vector computations compiled into the best vector hardware instructions on a supported CPU architecture to achieve higher performance than equivalent scalar computations.

  • Port the JDK to the Windows/AArch64 platform. With the release of new server-level and consumer AArch64 (ARM64) hardware, Windows/AArch64 has become an important platform.

  • On the X64 and AArch64 architectures, port the JDK to Alpine Linux and other Linux distributions that use MUSL as the primary C library. Musl is a Linux implementation of the standard library features described in the ISO C and Posix standards. Alpine Linux is widely adopted due to its small image size due to cloud deployment, microservices, and container environments.

  • Provide record classes that act as transparent carriers for immutable data.

  • Added Unix domain socket channels, where Unix domain (AF_UNIX) socket support was added to the socket channel and server socket channel APIS in the Nio. Channels package. The plan also extends the inherited channel mechanism to support Unix domain socket channels and server socket channels. Unix domain sockets are used for interprocess communication on the same host. They are similar to TCP/IP sockets in many ways, except that they are addressed by file system path names instead of IP addresses and port numbers. The goal of the new feature is to support all the features of Unix domain socket channels that are common on major Unix platforms and Windows.

  • An external memory access API that allows Java programs to securely access external memory outside the Java heap. This functionality will be re-incubated in JDK 16. The goal of optimization includes providing a single API to operate on various external storage (including native, persistent, and managed heap memory) that should not compromise the security of the JVM. In addition, many Java programs should access external storage, such as Lgnite, Memcached, and MapDB. But JavaAPI cannot provide satisfactory access external memory. MemorySegmentMemoryAddresses solution.

  • Pattern matching for operators (this feature was also previewed in JDK 14/15). On JDK 16, pattern matching allowed common logic in programs, namely extracting components from objects, to be expressed more succinctly and safely

  • Provides a jPackage tool for packaging standalone Java applications. Originally developed as an incubation tool in JDK 14, JPackage is still in the incubation phase in JDK 15. With JDK 16, JPackage is expected to move into production with support for native package formats, a smooth installation experience for users, and the ability to specify boot time parameters at package time. Formats include MSI and EXE on Windows, PKG and DMG on MacOs, and Deb and RPM on Linux. The tool can be invoked directly from the command line or programmatically. The new packaging tool addresses the many Java applications that need to be installed on the native platform in a first-class manner, rather than placed on, for example, the classpath or module path.

  • Migrate the OpenJDK source code repository from Mercurial to Git. This effort is driven by the advantages of versioning system metadata and available tools and hosting.

  • With JEP 369, the hosting platform was migrated to GitHub. On September 5th, the Mercurial JDK and JDK sandbox transition to Git, GitHub and Skara took place.

Following Java 16, Java 17 will be released in September 2021 as a long Term support (LTS) release, so developers on the front lines can wait. Are you looking forward to a new version of Java?

Refer to the link: www.infoworld.com/article/356…