• 周六. 7 月 13th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

JDK 16 will be released soon. Quick view of new features!

King Wang

1 月 16, 2022
You can still catch up with Java Update speed of ?

When developers get caught up in Java 8 The time of edition , Here’s the next version Java 16 With the latest news , And Java 15 equally , As a short-term version ,Oracle Available only 6 Months of support .

According to the release plan ,JDK 16 Will be in 12 month 10 Day and 2021 year 1 month 14 Get into Rampdown Stage ,2021 year 2 month 4 The day is coming 2 month 18 We are entering the release candidate stage .

The final version is expected in 2021 year 3 month 16 Official release .

recently , JDK 16 New features coming up , Next , We’ll have a look at it :

  • before JDK 15 The sealed classes and interfaces previewed in restrict other classes and interfaces from extending or implementing them . The goals of the program include , Allows the author of a class or interface to control the code responsible for implementing it , Provides a more declarative way to restrict the use of superclasses than access modifiers , And support the future direction of pattern matching by providing a basis for pattern analysis .
  • By default , Yes JDK Strong encapsulation inside , But the key inside API( Such as misc.Unsafe ) With the exception of . Users can choose from JDK 9 Since the default loose strong package . The goals of this proposal include improving JDK Security and maintainability of , As a project Jigsaw Part of , And encourage developers to move from using internal elements to using standards API, So that developers and end users can easily update to future Java edition .
  • External linker API, Static types are provided 、 pure Java Access to native code . this API Will be in JDK 16 In the incubator stage .
  • take ZGC(Z Garbage collector ) Thread stack processing moves from safe point to concurrent phase . The objectives of this program include from ZGC Delete thread stack processing in safe point .
  • Elastic Metaspace functions , It will be able to move unused HotSpot VM Class metadata ( Meta space ) Memory back to the operating system , Reduce meta space footprint and simplify meta space code to reduce maintenance costs .
  • Enable C++ 14 Language function , Allow in JDK C++ The source code uses C++ 14 function , It also provides some functions for HotSpot VM Specific guidelines for code .
  • The vector of the incubator stage API, among JDK An incubator module will be installed , Used to indicate that compiled to support CPU Vector computation of the best vector hardware instruction in architecture , To achieve higher performance with equivalent scalar computation .
  • take JDK Migration to Windows/AArch64 platform . With the new server level and users AArch64 (ARM64) Hardware release ,Windows/AArch64 Has become an important platform .
  • stay x64 and AArch64 Architecturally , take JDK Migration to Alpine Linux And other uses musl As the master C Library Linux Distribution version .Musl yes ISO C and Posix The standard library function described in the standard Linux Realization . Due to cloud deployment 、 Microservices and container environments ,Alpine Linux Because of its small image size , So it’s widely used .
  • Provide record classes that act as transparent carriers for immutable data .
  • increase Unix Domain socket channel , among Unix Domain (AF_UNIX) Socket support added to nio.channels The socket channel in the package and the server socket channel API in . The plan also extends the inheritance channel mechanism , To support the Unix Domain socket channel and server socket channel .Unix Domain sockets are used for inter process communication on the same host . They are in many ways related to TCP/IP Socket is similar to , It’s just that they have file system pathnames instead of IP Address and port number addressing . The goal of the new feature is to support Unix All the functions of the domain socket channel , These functions are Unix The platform and Windows Very common in .
  • An external memory access API, allow Java Programs safely access Java External storage outside the heap . This feature will be in JDK 16 It’s re hatching . The goal of optimization includes providing a single API For a variety of external memory ( Including the machine 、 Persistent and managed heap memory ) To operate ,API It should not be destroyed JVM The security of . Besides , many Java Programs should access external memory , Such as Lgnite、Memcached and MapDB. however JavaAPI Unable to provide satisfactory access to external memory .MemorySegmentMemoryAddresses Solutions for .
  • Pattern matching for operators ( The function is also in JDK 14/15 Preview is implemented in the version ). stay JDK 16 On , Pattern matching allows general logic in the program , That is to extract components from objects , Can be more concise 、 Express more safely .instanceof Operator .
  • Provides for packaging stand-alone Java Applications jpackage Tools . First as JDK 14 Incubator tools in ,jpackage stay JDK 15 Is still in the incubation period . Expect to JDK 16 edition ,jpackage Will enter the production environment , Support local package format , And to provide users with a smooth installation experience , And allows you to specify the startup time parameter when packaging . The format includes Windows Upper msi and exe、 MacOs Upper pkg and dmg、 as well as Linux Upper deb and rpm . The tool can be called directly from the command line , You can also call… Programmatically . The new packaging tool solves a lot of Java Applications need to be installed on the native platform in a state-of-the-art way , Instead of being placed on the classpath or module path .
  • OpenJDK Source code repository from Mercurial Migrate to Git. The advantage of metadata and versioning tools is to drive this work .
  • With the help of JEP 369, The hosting platform is migrated to GitHub. In this year 9 month 5 Japan ,Mercurial JDK and JDK Sandbox Git、GitHub and Skara The transition has been achieved .

Following Java 16 after ,Java 17 Will be in 2021 year 9 Published in , It’s long-term support (LTS) edition , So developers on the front line of R & D can wait .

Regarding this , You’re looking forward to the new version Java The arrival of ?

Reference link :

https://www.infoworld.com/article/3569150/jdk-16-the-new-features-in-java-16.html

watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=

《JDK 16 will be released soon. Quick view of new features!》有3个想法

发表回复