A list,

Oracle has officially announced the release of Java 11 on September 26, 2018. This is the first long-term support release of Java after the big release cycle, and it’s very noteworthy. The latest release of Java11 will bring important features such as ZGC and Http Client. New features in Java 11:

In terms of timing, JDK 11 was released just before the free update of JDK 8 expired, and JDK 9 and 10 became “historical releases”. JDK 11 will be a release that enterprises can’t ignore.

Second, updated details

Over the years, Oracle and the OpenJDK community have provided a near-free lunch, causing people to overlook the vast amount of work and value behind it, which includes but is not limited to: The latest security updates, such as the upgrade and maintenance of security protocols and other infrastructure, and the timely repair of security vulnerabilities, are one of the foundations for Java to become the core infrastructure of the enterprise. Lots of new features, Bug fixes, for example, container environment support, GC and other base area enhancements. A lot of production development of Hack, in fact, can be resolved by upgrading the JDK. Continuously improving JVMS, providing performance optimization at near zero cost…

ZGC

JDK11 introduces two new GCS, including perhaps the groundbreaking ZGC, which is currently an experimental feature, but represents a major breakthrough in the JDK in terms of capabilities and offers a possible alternative to the demanding requirements of specific production environments. For example, for some products such as enterprise core storage, if we can guarantee GC pauses of less than 10ms, reliability will be greatly improved, which is almost impossible for GC tuning in the past. It is a question of whether we can or cannot.

For the G1 GC, upgrading to JDK 11 is free compared to JDK 8: parallel Full GC, fast CardTable scanning, adaptive heap occupancy adjustment (IHOP), type offloading during the concurrent marking phase, and more. These are all enhancements to G1, where serial Full GC and even some of the most widely criticized shortcomings, and you’ll find GC configuration and tuning more and more convenient in JDK11.

Flight Recorder (JFR)

**Flight Recorder (JFR) ** is a powerful feature that Oracle has just opened source. JFR is a set of event mechanism framework integrated into the JDK and JVM. It can be extremely reliable and low cost through a well-architzed and designed framework, extreme optimization at the hardware level, and extensive verification in production environment. In benchmarks such as SPECjbb2015, the performance overhead of JFR is no more than 1%, so engineers can use it in large-scale distributed production systems with little psychological burden. This means that we can either actively turn on JFR for specific diagnostics at any time, or keep the system running JFR for a long time. For “after-fact” analysis in complex environments.

While maintaining low overhead, JFR provides capabilities that can be applied to very fine-grained analysis of lock contention, blocking, latency, JVM GC, SafePoint, and more. Even go deep into JIT Compiler to fully grasp hot methods, inline, inverse optimization and so on. JFR provides standard Java, C++ and other extension apis, which can be customized and integrated with applications at various levels, providing all-in-one solutions for complex enterprise application stacks or complex distributed applications. All of this is built into the JDK and JVM, requiring no additional dependencies, right out of the box.

Low-Overhead Heap Profiling

It is derived from the front-line practices of Google and other leading vendors in the industry. It provides the JDK with some shortcomings in object allocation diagnostics by obtaining object allocation details. Engineers can use this capability to enhance their own tools through JVMTI.

HTTP/2 Client API

The new HTTP API provides support for industry-leading standards such as HTTP/2, a streamlined and user-friendly API interface that is equal to or better performance than mainstream open source apis such as Apache HttpClient, Jetty, and OkHttp. At the same time, it is the first production practice of JDK in terms of reaction-Stream. It makes extensive use of Java Flow API, etc., and finally makes the Java standard HTTP class library meet the requirements of modern Internet in terms of extension ability.

Transport Layer Security (TLS) 1.3

The JDK project is led by Fan Xuelei, a Chinese security expert. It is a very large scale project, which is completely different from the previous tinkering.

Dynamic Class-File Constants

Dynamic class file constants. Extended the Java Class file format to support a new form of constant pool: CONSTANT_Dynamic.

Improve Aarch64 Intrinsics

It is mainly for ARM Aarch64 architecture optimization, such as providing optimized sin, cos and other functions.

Epsilon: A No-Op Garbage Collector(Experimental)

Garbage collector with no operations. Epsilon is a special garbage collector that only deals with memory allocation, not collection. Once the heap is exhausted, shut down the JVM.

It sounds like the collector doesn’t make sense. But it still has a lot of uses. Such as:

Performance testing. GC affects performance, and with a GC that does almost nothing, we can filter out the impact of GC. There are also performance factors that are not introduced by GC, such as compiler transformations, which we can compare with the Epsilon GC. Just like in biology, we can use it as a control group.

In addition, there are memory stress tests, VM interface tests, etc.

Launch Single-File Source-Code Programs

Unicode 10

Upgrade existing apis to support Unicode 10. Java SE 10 implements Unicode 8.0. Compared to Java 10, Java 11 supports 16 018 new characters and 10 new literal types.

Nest-Based Access Control

Nested based access control. Java 11 introduced nest, a new access control context in which classes logically in the same code entity, although compiled into different class files, can access each other’s private members, eliminating the need for the compiler to insert bridge methods to aid access.

Dynamic Class-File Constants

Dynamic class file constants. Extended the Java Class file format to support a new form of constant pool: CONSTANT_Dynamic.

Remove the Java EE and CORBA Modules

Java EE and CORBA marked as obsolete in Java SE 9 are officially removed from the Java SE platform.

Launch Single-File Source-Code Programs

Support for running source code in a single file. When learning Java or writing small tools, we usually compile source files with Javac first, and then run them with Java commands. With this feature, we can run the source program directly with Java commands. Something like this:

java HelloWorld.java
Copy the code

Deprecate the Nashorn JavaScript Engine

Scrap the Nashorn JavaScript scripting engine, API and JJS tools. Nashorn was introduced in JDK 8 with a full implementation of ECMAScript-262 5.1. However, as ECMAScript evolves faster Nashorn maintenance becomes more difficult.

Deprecate the Pack200 Tools and API

Deprecated the pack200 and unpack200 tools, and the Pack200 API in the java.util.jar package.

Please scan the code or search the wechat public number “Programmer Guoguo” to follow me, pay attention to surprise ~