The new features in Java 15


The new features in Java 15

The next version of standard Java will add text blocks, garbage collectors, and hidden classes and drop the Nashorn JavaScript engine.

With Java 14 having reached general availability March 17, work has begun on the successor, Java 15, due September 15, 2020. Thus far five official changes have been slated for the release, the latest being hidden classes. Previous proposals include the addition of text blocks, the addition of the Z and Shenandoah garbage collectors, and the removal of the Nashorn JavaScript engine.

By Paul Krill.

All five proposals have been officially targeted for Java Development Kit (JDK) 15, which is the basis for the next version of Java SE (Standard Edition). Prior to general availability in September, there will be rampdown phases in June and July, followed by two release candidates in August.

The OpenJDK 15 proposal specifics:

  • Hidden classes, i.e. classes that cannot be used directly by the bytecode of other classes, are intended for use by frameworks that generate classes at runtime and that use them indirectly through reflection. A hidden class can be defined as a member of an access control nest and can be unloaded independently of other classes. The proposal would improve the efficiency of all languages on the JVM by enabling a standard API to define hidden classes that are not discoverable and have a limited lifecycle. Frameworks inside and outside the JDK would be able to dynamically generate classes that could instead define hidden classes. Many languages built on the JVM rely on dynamic class generation for flexibility and efficiency. Goals of this proposal include: allowing frameworks to define classes as non-discoverable implementation details of the framework, so they cannot be linked against by other classes nor discovered through reflection; support for extending an access control nest with non-discoverable classes; and support for aggressive unloading of non-discoverable classes, so frameworks have the flexibility to define as many as needed. Another goal is to deprecate the non-standard API, misc.Unsafe::defineAnonymousClass, with the intent to deprecate for removal in a future release. Also, the Java language is not to be changed as a result of this proposal.

Click here to read more.

April 2024
May 2024
No event found!

Related Topics