Java 9 特性发布

jopen 10年前

Oracle has taken its development of Java 9 up a gear. A preliminary set of Java Enhancement Proposals (JEPs) for the next major release 9 has appeared on OpenJDK. And this time, Oracle are talking real features. Previous early access releases of JDK9 were restricted exclusively to “bug fixes and small enhancements only”.

新的API和性能特性

下一个版本包含了三个新的API:

  1. A lightweight JSON API 用于解析和生成的JSON文件和数据流

  2. A HTTP 2 Client 将带来HTTP2.0和WebSockets,而取代了传统的HttpURLConnection

  3. Process API Updates 提高控制和管理操作系统进程(开发者往往不得不使用本地代码用当前API)

Along with several other smaller features, as well as dozens of proposals already being tracked by the JEP Index, Oracle has promised another trio of performance features:

  1. Improve contended locking, which aims at improving performance when threads compete over access to objects

  2. Segmented code cache with better performance, shorter sweep times, less fragmentation and further extensions to come

  3. The Smart Java compiler, or sjavac, will be improved to allow default use in the JDK build and general use for building larger projects 

Java’s native interface will also be revisited as part of the Java Native Runtime project, which was hinted at during the JavaOne in 2011, when Oracle also discussed a Java 9 release in 2016 featuring improved support for multi-gigabyte heaps and a self-tuning JVM.

Modular Source Code

If these features haven’t already whet your appetite, then Oracle’s promise of modular source code surely will. JEP 201 is aiming to reorganise the source code of the JDK into modules, and thereby essentially lay the foundations for a structured implementation of Project Jigsaw.

Jigsaw, which was dropped from Java 7 and pushed back to Java 9, remains one of the biggest talking points of Oracle’s next release. The chief goals of the project are to provide to scalability for smaller devices, improved security for the JDK and Java SE, enhanced performance and easier construction of libraries and large applications. Meanwhile, the Penrose Project is exploring interoperability between Jigsaw and the Open Source Gateway initiative.

来自:http://jaxenter.com/java-9-features-announced-50896.html

Georges Saab, VP of Software Development at Oracle’s Java Platform Group previously told JAXenter that work is progressing on the Jigsaw project and the the development team “is exploring and prototyping a simplified approach” to ensure that it’s ready in time for Java 9.

A turbulent release history

However Oracle has been know to struggle with the punctuality of its Java releases. Numerous setbacks, such as the trickier-than-expected Project Lambda and the infamous applet-based security issues forced the company to push back the release of Java 8 by a total of two years. And even since then, an update of Java 8 has reportedly been causing numerous dev tools to break down.

Java 9 is currently planned for 2016, giving Oracle less than two years (as opposed to the usual three) to ready the new release, but also leaving plenty of time for requests,rumours, feature announcements and the inevitable delays.