JavaOracles Makes Case for Java 17

Oracles Makes Case for Java 17

Today, Oracle made available a Java 17 release of the programming language that remains the most widely employed means for building enterprise applications despite the rise of many rivals.

JDK 17, among other capabilities, makes available a wide range of language enhancements, updates to the libraries, removals, and deprecations of legacy features, previews of additional application programming interfaces (APIs), and work to ensure Java code written today will continue working without change in future versions of the Java Development Kit.

It also brings with it support for the latest generation of Apple computers for the first time.

In total, there are 14 JDK Enhancement Proposals (JEPS) that include:

  • JEP 409: Sealed Classes – Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them. This enhancement is an extension of Project Amber, an initiative Oracle launched to make it easier to incrementally add more features to Java as they become available.
  • JEP 306: Restore Always-Strict Floating-Point Semantics – The Java programming language and Java virtual machine originally only allowed strict floating-point semantics. Variances that were once allowed are now being removed.
  • JEP 356: Enhanced Pseudo-Random Number Generator – Provides new interface types and implementations for pseudorandom number generators (PRNGs) to improve interoperability between them. It also makes it simpler to request an algorithm based on requirements rather than hard coding a specific implementation.
  • JEP 382: New macOS Rendering Pipeline – Implements a Java 2D pipeline for macOS using the Apple Metal API. The new pipeline will reduce the JDK’s dependency on the deprecated Apple OpenGL API. 
  • JEP 391: macOS AArch64 Port – This port will allow Java applications to run natively on the new Arm 64-based Apple Silicon computers.
  • JEP 398: Deprecate the Applet API for Removal – All web browser vendors have either removed support for Java browser plug-ins or announced plans to do so. The Applet API was already deprecated with the release of Java 9 but not removed.
  • JEP 407: Remove RMI Activation – Removes the Remote Method Invocation (RMI) Activation mechanism while preserving the rest of RMI.
  • JEP 410: Remove the Experimental AOT and JIT Compiler – The experimental Java-based ahead-of-time (AOT) and just-in-time (JIT) compiler were experimental features that failed to gain widespread adoption. They were already removed from JDK 16. This JEP removes these components from the JDK source code.
  • JEP 411: Deprecate the Security Manager for Removal – The Security Manager dates back to Java 1.0. It has not been the primary means of securing client-side Java code for many years, and it has rarely been used to secure server-side code. Removing it in a future release will eliminate a significant maintenance burden.
  • JEP 403: Strongly Encapsulate JDK Internals – It will no longer be possible to relax the strong encapsulation of internal elements via a single command-line option, as was possible in JDK 9 through JDK 16. It will still be possible to access existing internal APIs, but it will now require enumerating using command-line parameters or JAR-file manifest attributes. This change will lead to more secure applications and fewer dependencies on non-standard, internal JDK implementation details. 
  • JEP 406: Pattern Matching for switch (Preview) – Allows an expression to be tested against several patterns, each with a specific action, to enable complex data-oriented queries to be expressed concisely and safely.
  • JEP 412: Foreign Function and Memory API (Incubator) – Improves incubating APIs introduced in JDK 14 and JDK 15 that enable Java programs to interoperate with code and data outside of the Java runtime. By efficiently invoking foreign functions safely via foreign memory, these APIs enable Java programs to call native libraries and process native data without the brittleness and complexity of Java Native Interface (JNI). These APIs are being developed in Project Panama, which was created to improve the interaction between Java and non-Java code. 
  • JEP 414: Vector API (Second Incubator) – Allows expressing vector computations that reliably compile at runtime to optimized vector instructions on supported CPU architectures to improve performance superior to equivalent scalar computations.

Java 17 is the latest long-term support (LTS) release under a six-month update cadence that Oracle has been implementing. Oracle is proposing that the next LTS release should be Java 21, due out in September 2023, which changes the current LTS release cadence from three years to two years. Oracle JDK 17 and future JDK releases are provided under a free-to-use license until a full year after the next LTS release. Oracle will also continue providing Oracle OpenJDK releases under the open-source General Public License (GPL). Oracle will provide customers with security, performance, and bug-fix updates for Java 17 through at least September 2029. 

The challenge Oracle continues to encounter is many developers are still primarily using Java 8 to build applications. A combination of new capabilities for building modern applications coupled with less restrictive licensing terms should encourage developers to advocate for migrating to Java 17 faster, says Georges Saab, vice president of development for Java Platform Oracle. “Developers are pushing their organizations to move forward,” he says.

History, however, suggests it might be a while before the majority of organizations make that transition. 

Learn more about Java programming.

Latest Posts

Related Stories