Monday, June 27, 2016

Java 8 vs Java 9

Java 8

Code name is Spider. Features Added:
- JSR 335, JEP 126: Language-level support for lambda expressions.

- JSR 223, JEP 174: Project Nashorn, a JavaScript runtime which allows developers to embed JavaScript code within applications.

- JSR 308, JEP 104: Annotation on Java Types.

- Unsigned Integer Arithmetic.

- JSR 337, JEP 120: Repeating annotations.

- JSR 310, JEP 150: Date and Time API.

- JEP 178: Statically-linked JNI libraries.

- JEP 153: Launch JavaFX applications (direct launching of JavaFX application JARs).

- JEP 122: Remove the permanent generation.

- Java 8 is not supported on Windows XP. But as of JDK 8 update 5, it still can run under Windows XP after forced installation by directly unzipping from the installation executable.

Java 9

Features Added:
- A lightweight JSON API for consuming and generating JSON documents and data streams.

- A HTTP 2 Client that will bring HTTP 2.0 and websockets, while replacing the legacy HttpURLConnection.

- Process API Updates to improve controlling and managing operating-system process (developers were often forced to use native code with the current API). Along with several other smaller features, as well as dozens of proposals already being tracked by the JEP Index, Oracle has also 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.

No comments:

Post a Comment