Java 16 is scheduled to be released on March 16. Here is a look at what changes you can expect in the release.
This Java Enhancement Proposal (JEP) will provide an initial iteration of an incubator module that can express vector calculations compiled at runtime. This module will be clear and concise, platform-agnostic, have reliable runtime compilation and performance on x64 and AArch64 architectures, and offer graceful degradation when a vector computation cannot be fully expressed, the OpenJDK team explained.
This addition aims to features and give specific guidance on which features can be used in HotSpot code.
This JEP relates to the goal of migrating the OpenJDK Community’s repositories from Mercurial to Git.
Similar to JEP 357, this relates to the goal of hosting the OpenJDK Community’s Git repositories on GitHub. All single-repository OpenJDK projects will be migrated, including JDK feature releases and 11 and later.
This will remove thread-stack processing from ZGC savepoints, make stack processing lazy, cooperative, concurrent, and incremental, remove per-thread root processing from ZGC savepoints, and provide a mechanism for HotSpot subsystems to process stacks, according to OpenJDK lazily.
Unix-domain sockets are used for inter-process communication. They are similar to TCP/IP sockets, but filesystem pathnames address them instead of IP addresses and . It is intended for Java to support all Unix-domain socket features standard across .
This JEP aims to port the JDK to Alpine Linux and other Linux distributions that use musl as their primary C library.
According to OpenJDK, Metaspace has been notorious for using a lot of off-heap memory. This feature aims to return new HotSpot class metadata to the operating system, reducing Metaspace’s footprint and simplifying Metaspace code to reduce maintenance costs.
The JDK will complete its port to Windows/AArch64.
Java will introduce an API that offers “statically typed, pure-Java access to native code.” In combination with the Foreign-Memory API, this will simplify the process of binding to a native library, which is an error-prone process.
This feature will designate primitive wrapper classes as value-based. It will also deprecate their constructors for removal, which will launch new deprecation warnings.
The new package tool can be used to package Java applications.
This API enables applications to safely access foreign memory outside the Java heap. It was created because many Java applications access foreign memory, but the Java API doesn’t have an efficient or safe way of accessing foreign memory.
This feature aims to enhance the pattern-matching capability of the instanceof operator. According to the OpenJDK team, pattern matching allows common logic to be expressed concisely and safely.
Records are classes that can carriers for immutable data,” the OpenJDK team explained. They can be helpful with modeling data aggregates.
According to the team, this change will encapsulate
elements by default, except for critical internal APIs like the sun. Misc.Unsafe. Strong encapsulation ensures that code outside a module can only access public and protected parts of a package and that protected elements can only be accessed from subclasses of their defining classes. The motivation behind this strong encapsulation is that developers of libraries, frameworks, and tools often use interior elements in ways that compromise security and maintainability.
Sealed classes restrict which other types extend or implement them. They will allow the author of a course to control what code can be used to implement it, , and support future directions in pattern matching.
is a community site for Java and OpenJDK developers. Azul, Datadog, DataStax, JFrog, Payara, and Snyk are the initial companies that will be a part of the advisory board.
According to Foojay, the board will guide the direction, content, and oversight of the Foojay.io site. It will also work toward growing the community and continuing mFoojay’say’s mission of providing free information to Java developers”.
“Foojay is an example of the strength and longevity of the Java community that is greater than any single comp” ny,” said Stephen Chin, of developer relations at JFr” g. “It is composed of active, passionate, and caring individuals who want to share their expertise and help mentor the next generation of developeWe’ree’re excited to be part of the conversation and help the community leverage modern CI/CD and cloud-native technologies for our beloved J” va.”