Java 11 Adds Nestmates
Written by Kay Ewbank   
Monday, 01 October 2018

Java 11 has been released with nest-based access controls, dynamic class-file constants, and a new garbage collector.

JDK 11 is the open-source reference implementation of version 11 of the Java SE 11 Platform. Production-ready binaries under the GPL are available from Oracle; binaries from other vendors will follow shortly.

openjdklogoThis version is the first of the long-term support (LTS) releases that Oracle announced last September. From Java SE 9 onwards, Oracle has provided Oracle JDK for free under the BCL, but has also provided builds of OpenJDK under an open source license similar to that of Linux. The plan is to make the Oracle JDK and OpenJDK builds from Oracle interchangeable and is aiming them at developers and organizations who do not want commercial support or enterprise management tools. From this version onwards, the Oracle JDK royalty-free version is limited to use for development, testing, prototyping or demonstrating purposes. 

This is an important aspect to bear in mind because it means it's important you download the OpenJDK build of Java 11, otherwise Oracle will require you to pay for a license if you're using its Oracle JDK for commercial purposes.

The main improvements to Java 11 start with the addition of nestmates - nest-based access controls. These are designed to fit alongside the existing notion of nested types in Java. Nests allow classes that are logically part of the same code entity, but which are compiled to distinct class files, to access each other's private members without the need for compilers to insert accessibility-broadening bridge methods

Dynamic class-file constants have also been added. These extend the Java class-file format, and loading a dynamic class-file constant will delegate creation to a bootstrap method. They have been introduced to reduce the cost and disruption of creating new forms of materializable class-file constants so that language designers and compiler implementors can be more creative when adding features.

Another improvement to the new version is the addition of not one but two new garbage collectors, both still at the experimental stage Epsilon is designed to handle memory allocation but does not implement any actual memory reclamation mechanism. Its aim is to provide a completely passive GC implementation with a bounded allocation limit and the lowest latency overhead possible, at the expense of memory footprint and memory throughput.

The second new garbage collector, ZGC, is a scalable low-latency garbage collector that aims to keep GC pause times under 10ms, and to handle heaps ranging from relatively small (a few hundreds of megabytes) to very large (many terabytes) in size. It also aims to have a less than 15% application throughput reduction compared to using G1.

Other improvements include an open source version of the Flight Recorder that until now was part of the commercial distribution. It is a data collection framework for troubleshooting Java applications and the HotSpot JVM. There's also a new standard HTTP library that standardizes the incubated HTTP Client API introduced in JDK 9.

openjdklogo

 

More Information

OpenJDK

Open JDK Java Build.

Related Articles

JDK 10 Released

JavaFX Will Be Removed From JDK

Java 9 Finally Appears

Java 9 Slips Again

No Vote For Java Module System

JDK 9 Release Slips Again 

JDK Delivery Date Update

Jigsaw In JDK

JDK 9 Update

JDK 9 Early Access Now Available

Java JDK 9 Proposals

Jigsaw Shelved Until Java 9

Java 8 Launched With Supporting Line-Up

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin.

Banner


Perl for the Web: Mojolicious 8.0 Released
24/09/2018

Far gone are the days when you wrote Perl for the web in just CGI. Dancer, Catalyst and Mojolicious are the modern ways of going about it, with Mojo's version 8.0, code-named "Supervillain", being rel [ ... ]



Couchbase Launches JSON Analytics
28/09/2018

There's a new analytics service for Couchbase that comes with SQL++, a query language framework that can be used to write queries on document-oriented data and the JSON data format.


More News

Python

 



 

Comments




or email your comment to: comments@i-programmer.info