Can be in jdk.java.net You can find on Linux,Windows and MacOS Of JDK 16 Early versions . And JDK 15 equally ,JDK 16 It's going to be a short-term version , Six months of support . Will be in 2021 year 9 Released on JDK 17 It will be a long-term support （LTS） edition , Will have years of support . Current LTS edition JDK 11 Has been in 2018 year 9 Published in .
JDK 16 Will be the standard Java Version reference implementation , Next year 3 The coming of the month .
By 10 month 8 Japan , Eight proposals are officially aimed at JDK16.Java16 The new features include ：
- take ZGC（Z Garbage collector ） Thread stack processing From a safe point safepoints Move to the concurrency phase . The objectives of the program include ZGC Delete thread stack processing in safe point . Make stack processing lazy , Collaboration , Concurrency and increment ; from ZGC Safe point removes all other per thread root processing ; And for the rest of HotSpot VM The subsystem provides a mechanism to delay processing the stack . such ,ZGC send HotSpot Medium GC Pause and scalability issues are in the past . up to now , Expanding with heap size and Metaspace size GC The operation has moved out of the safe point operation and into the concurrent phase . These include markers , relocation , Reference processing , Class unloading and most root handling .GC The only remaining activity in a security point is a subset of root processing and time limited tag termination operations . These roots include Java Thread stack and other thread roots , There are problems with these roots , Because they grow with the number of threads . In order to go beyond the current situation , Every thread processing, including stack scanning, must be moved to the concurrent phase . Use this program , The throughput cost of improved latency should be negligible , And on a typical computer ZGC The time spent in a safe point should be less than one millisecond .
- Elastic element space capability , It can put unused HotSpot VM Class metadata （ Meta space ） Memory returns to the operating system more quickly , This reduces the footprint of the meta space and simplifies the meta space code , This reduces maintenance costs . There are a lot of memory usage problems out of the heap in the meta space . The plan calls for replacing the existing memory allocator with a partner based allocation scheme , Provides an algorithm that divides memory into multiple partitions to satisfy memory requests . This method is already in Linux Kernel, etc , It will make it possible to allocate memory in smaller blocks to reduce class loader overhead . There will also be less debris . Besides , Memory commitments from the operating system to memory management will be delayed as needed , Reduced footprint for loaders that start with large stages but do not use them immediately or may not use them fully . To take full advantage of the flexibility provided by partner allocation , Arrange the meta space memory into uniform size particles , These particles can commit and not commit independently of each other .
- Enable C ++ 14 Language function , To allow JDK C ++ The source code uses C ++ 14 function , And provide information about HotSpot VM A specific guide to which of these features can be used in the code . adopt JDK 15,JDK in C ++ The language functions used by the code have been limited to C ++ 98/03 Language standards . Use JDK 11, The source code has been updated , To support the use of a newer version of C ++ Standards . This includes being able to use support C ++ 11/14 Language features of the latest version of the compiler to build . This proposal does not suggest that HotSpot In addition to the use of C ++ Change the style or usage of the code . But use C ++ Language function , You need to make some build time changes , Depending on the platform compiler .
- The vector of the incubator stage API, among JDK An incubator module will be installed ,jdk.incubator.vector, To express what can be supported in CPU Vector computation compiled as the best vector hardware instruction on architecture , To achieve better performance than equivalent scalar computation . vector API Provides a way to use Java The mechanism for writing complex vector algorithms , The mechanism uses HotSpot VM Vectorization of pre-existing support in , But its user model makes vectorization more predictable and reliable . The goal of the proposal is to provide a clear and concise API To express a series of vector calculations , By supporting multiple CPU Architecture independent of platform , stay x64 and AArch64 Architecture provides reliable runtime compilation and performance . Graceful demotion is also a goal ,
- take JDK Migration to Windows / AArch64 platform . With the new server class and consumer class AArch64（ARM64） Hardware release , Because of demand ,Windows / AArch64 Has become an important platform . Although the migration itself is almost complete , But the focus of the proposal is to integrate the ports into the mainline JDK Repository .
- stay x64 and AArch64 Architecturally , take JDK Migration to Alpine Linux And other uses musl As its main C Library Linux Distribution version .Musl yes ISO C and Posix The standard library function described in the standard Linux Realization . because Alpine Linux The image is smaller , So it's deployed in the cloud , It is widely used in microservices and container environments .Linux Of Docker Image less than 6MB. In this setting, let Java Out of the box operation , Will allow Tomcat,Jetty,Spring And other popular frameworks here Some environments run locally . By using jlink Reduce Java The size of the runtime , Users can create even smaller images tailored to run specific applications .
- OpenJDK Source code library from Mercurial Migrate to Git. What drives this effort is the size of version control system metadata and the advantages of available tools and hosting .
- Migrate to GitHub, And from the Mercurial To Git The migration of ,JDK 16 Source code repositories are located on popular code sharing sites .Mercurial JDK and JDK-sandbox to Git,GitHub and Skara The transition has been completed in 9 month 5 Day to complete , It's now open for contributions .