Critical moment, first time delivery!
Oracle has released the Java development Kit 10, and the next version of JDK 11 will be released. This article describes the new features of Java 11.
According to Oracle's new 6-month release of the Java SE Rhythm, java 11 will be released in September 2018, and Oracle has announced several new features so far.
In addition, Java 11 will also remove some features, including the removal of CORBA and Java EE (recently renamed Jakarta EE) modules, and the removal of JavaFX.
Unlike JDK 10, JDK 11 will provide long-term support and will also serve as a reference implementation for the Java platform as well as Standard Edition (Java SE) 11. Oracle provides first-level support for JDK 11 until September 2023, while extended support such as patches and security warnings continues to 2026. The new long-term support release is released every three years, and JDK 17 will be released in 2021, based on subsequent release plans.
New features planned in the Java one JDK
At this point, JDK 11 already has nine new features already identified, and more new features are still under consideration. New features of the program include:
HTTP client (standard), this feature was introduced in JDK 9 and updated in JDK 10, and is now finally positive. The API provides non-blocking request and response semantics through completeablefutures, which can be used together to trigger the corresponding action. Since the feature was introduced in JDK 9 and 10, JDK 11 has completely rewritten the feature and now its implementation is completely asynchronous. The concept of RX flow is also implemented so that there is no need to create many concepts to support HTTP/2. It is now easier to trace the data flow between the user layer requesting the publisher and the response Publisher and the underlying socket. This reduces complexity and maximizes the likelihood of reuse between HTTP/1 and HTTP/2.
The Epsilon garbage collector, known as the "No-op" collector, is only responsible for memory allocations, but does not implement any actual memory recycling mechanisms. The Epsilon collector can be used for performance testing, memory stress testing, and virtual machine interfaces. It can also be used for short life-cycle tasks.
The local variable syntax of the lambda parameter eliminates the inconsistency between the syntax of the formal parameter definition in an implicit type expression and the local variable definition syntax. This allows you to use Var when defining formal parameters in an implicitly typed lambda expression.
The Java class file format will be extended to support the new constant pool, constant_dynamic. The goal is to reduce the cost and disruption associated with developing new forms of executable class file constraints.
The key exchange using Curve25519 and Curve448 encryption is more efficient and more secure than the existing Diffie-hellman elliptic Curve key exchange method. According to the IETF data, the two elliptic curves of Curve25519 and Curve448 are implemented in constant time, and the multiplication implementation without exception can better resist various bypass attacks, including sequential attacks, cache attacks, etc. The goal of this proposal is to provide an API and implementation for the key exchange approach, while developing a platform-independent, pure Java implementation. Because the proposal uses complex and sophisticated modulo arithmetic, it is risky.
The flight recorder (Flight Recorder) will provide a low-overhead data collection framework for debugging Java applications and the hotspot JVM. Flight data recorder is the functionality of Oracle's commercial JDK, but in JDK 11, its code is moved to the public code base so that everyone can use it. Iclouded will act as an API to generate or consume data in the form of events, while providing caching mechanisms, binary data tools, and support for configuration and event filtering. The proposal also proposes to provide events for the OS, hotspot, and JDK libraries.
Update the Platform API to support Unicode version 10.0, so Java keeps up with the trend. The following classes are expected to support:
Character and string in the Lang packet
Numericshaper in the Awt.font package
Bidi, Breakiterator, and Normalizer in the text package
Implement CHACHA20 and Poly1305 encryption algorithms. CHACHA20 is a relatively new stream encryption algorithm, which can replace the old, insecure R4 stream encryption. The ChaCha20 will be paired with the Poly1305 authentication algorithm. The CHACHA20 and chacha20-poly1305 encryption implementations will be available through the CRYPTO.CIPHERSPI API in Sunjce (Java encryption extensions).
Enhance the Java Launcher to enable it to run a single file of Java source code, allowing the application to run directly from the source code. Single-file programs are common in small tools, or when developers use Java as a beginner. Also, a single source code file can be compiled into multiple class files, which increases the packaging overhead. For these reasons, compiling before running the program has become an unnecessary step.
New features in Java JDK 11 that are still in development
The creators of Java 11 are also considering several proposals for changes or new features of JDK 11:
Adds raw string literals to Java. This makes it easier to write the sequence of characters in a human-readable form, without the need for special Java tags. This also makes it easier to provide a string of non-Java syntax for use in Java, and to support multiple lines of string without the use of special tags.
Extend the switch statement so that it can be used as a statement or an expression. This can also improve the way that switch handles null values. These changes can simplify programming and prepare for switch support pattern matching.
Nested access control that corresponds to the current nested type of java. Nesting allows classes that logically belong to the same code entity but are compiled into different class files to access each other's private members without having the compiler insert methods that extend access.
Features removed from JDK 11
Java EE and CORBA modules are deprecated from Java SE9 (deprecated) and are scheduled to be removed in a future release. This future version is JDK 11.
Java SE 6 was released in 2006, 12, which provides a complete set of WEB services technology stacks for the Java EE platform: JAX-WS (Java API for xml-based Web services), JAXB (Java Architecture for XML Binding), JAF (JavaBeans Activation Framework), and common Annotations for Java. Over the years, the Java EE version has evolved, causing a lot of trouble for Java SE, such as the difficulty of joining technologies unrelated to Java SE and maintaining the two Java versions at the same time. Because the standalone Java EE version is provided by a third-party web site, Oracle says Java EE is no longer necessary for Java SE or JDK.
Of course, some applications that rely on Java EE APIs and tools in the JDK will not compile or run. Porting JDK 6, 7, or 8 to a new version will result in binary incompatibility and source code incompatibility. Oracle says developers who are affected by these effects can deploy the appropriate Java EE version.
CORBA came from the 1990s, and Oracle said it was pointless to develop modern Java applications using CORBA, and that the cost of maintaining CORBA had exceeded the benefits of preserving it.
However, removing CORBA will make it impossible for CORBA implementations that rely on the JDK to provide some of the CORBA APIs. There is no third-party CORBA version, and there is no certainty that a third party will be willing to take over the maintenance of the CORBA API.
JavaFX has been removed, so it has nothing to do with the Java JDK's two updates per year.
Original: https://www.infoworld.com/article/3265447/java/java-11-roadmap-the-new-features-you-can-expect.html
Translator: Crescent Moon, Zebian: the word
New features for Java 11 come up!