Java 9 特性發布
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:
-
A lightweight JSON API 用于解析和生成的JSON文件和數據流
-
A HTTP 2 Client 將帶來HTTP2.0和WebSockets,而取代了傳統的HttpURLConnection
-
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:
-
Improve contended locking, which aims at improving performance when threads compete over access to objects
-
Segmented code cache with better performance, shorter sweep times, less fragmentation and further extensions to come
-
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.