Comprehensive Guide on Java 9 and Java 10 Updates

Java 9 and Java 10

爪哇 9 and Java 10

Let us explore Java 9 first

概觀

爪哇 9 is now available for use. Like with any major software release, it has many new features, enhancements and deprecation. 請注意,這將在舊式的Java版本的行的最後一個主要版本,,en,Java的版本將提供兩次一年,,en,一切,,en,雖然有許多新的特點,,en,最顯著的那些已經模塊化和讀取 - 求值 - 輸出循環,,en,工具,,en,可用性模塊化允許軟件開發者劃分源代碼轉換成邏輯模塊,,en,定義依賴跨模塊在運行時需要結合模塊來開發應用軟件,,en,模塊化結構,,en,沒有使用Java的爭論銷售商劃分其有效性,,en,讀EVAL-打印循環,,en,通過工具只是評估了一些聲明語句和表達式提供反饋對代碼質量或接受軟件開發商,,en,該功能預計將節省時間和提高生產力,,en. From 2018, Java releases will be available twice in a year, every 6 months. While there are many new features, the most notable ones have been modularity and the read-eval-print loop (REPL) tool. Availability of modularity allows software developers to divide source code into logical modules, define dependencies across modules and combine required modules at run time to develop software applications. The modularity is, however, not without controversies with Java vendors divided on its effectiveness. The read-eval-print loop (REPL) tool provides feedback to software developers on the code quality or acceptance by just evaluating some declarative statements and expressions. This feature is expected to save time and improve productivity. 其中最重要的改進是編譯器的改進,,en,一個新的特點,,en,所謂名列前茅的時間,,en,可以提高編譯速度,,en,請注意,此功能仍處於實驗階段,,en,前面已經提到,,en,還有許多其他的功能,,en,改進和棄用,,en,要了解更多關於Java,,en,閱讀,,en,為了提供易於理解,,en,這篇文章分為三個部分,,en,新功能,,en,新功能,,en,在這裡我們將討論有關新功能,,en,模塊化,,en,它被認為是在這個版本中最重要的特徵,,en,模塊化幫助你劃分到JDK邏輯模塊,,en,當你運行程序,,en,你可以結合模塊構成一個程序,,en,你可以清楚地定義模塊間的依賴關係和其他交互,,en. A new feature, called ahead-of-time (AOT) compilation, can improve compilation speed. Note that the feature is still in the experimental phase. As already mentioned, there are many other features, enhancements and deprecations. To know more about Java 9, read on. To provide ease of understanding, this article is divided into three sections: New features, enhancements and deprecations.







New Features: Here we will discuss about new features.

· Modularity

It is believed to be the most important feature in this release. Modularity helps you to divide the JDK into logical modules. Later, when you run the program, you can combine the modules to constitute one program. You can clearly define the dependencies and other interactions across modules. Modularity is expected to bring many benefits which include scaling the application up and down based on clients such as mobile devices, better security and performance and maintainability of libraries and large applications for both Java SE (標準版) and Java EE (Enterprise Edition). To implement modularity, many changes have been done which include restructuring of the JDK and Java Runtime Environment (JRE) images and providing access to the JavaFX UI controls and CSS APIs.

If you need to migrate to the modularized Java 9, Oracle allows illegal reflective access from code on the class path by default in JDK 9. 但, this facility will be discontinued from the next release.

· AOT

Though this can improve compiler performance which should be counted as an enhancement, AoT is a new feature. Note that it is still in the experimental phase. We know that the source code need to be compiled before the software program starts to work and Java offers the Just-in-Time (JIT) compilers for that. 但, Java programs have become too large even for the JIT compilers to start them fast. As a result, some Java methods are left uncompiled. The AoT can improve startup performance by compiling Java classes into native before launching into the virtual machine.

· REPL

The REPL helps software developers improve productivity by providing interim feedback on declarative statements and expressions. Developers can feed declarative statements and expressions after writing them partially and get feedback. Rather than having to address many errors after writing long lines of code, the developers can now address issues in the interim.

· JVM Compiler Interface (JVMCI)

The JVMCI, as the name suggests, is an interface that allows the Java Virtual Machine (JVM) to access and use compilers written in Java dynamically. The JVMCI provides an API which provides ways to the JVM to access the VM structure, install compiled code and plug the compiler to the JVM compilation system. 但, you need to note that this feature is still in the experimental phase.

Enhancements : Let us check enhancements

· Stream API

The Stream APIs allows software developers to add methods so that items from streams can be taken and dropped conditionally; iterate over Stream elements and create a stream from a null value at the time of expanding the Java SE API set which can act as stream sources.

· Code cache segments

You can divide code cache into segments to improve code performance and allow extensions such as fine-grained locking. Code caching segments can offer better results in the form of improved sweep times due to non-method and non-profiled code skipping and separation and improved execution time for some benchmarks.

· Improved Unicode and HTML 5 support

The JDK supports the Unicode 8.0 encoding standard which adds 8000 characters, six scripts and 10 blocks. Also, the Javadoc documentation tool can now generate HTML 5 markup.

· Improved data security

爪哇 9 adds an API for using the Datagram Transport Layer Security (DTLS). This means improved security to prevent eavesdropping, forgery and tampering of messages used in client -server communications. The enhancement is available for both client and server ends.

· HTTP upgrade

爪哇 9 can now support the higher version of HTTP protocol, the HTTP/2 client. 爪哇 9 can upgrade to the protocol with an API. Note that the HTTP/2 protocol is in the beta stage. 爪哇 9 can support the Web socket with the API as well. Now you can stop using the problematic HttpURLConnection API or the HTTP/1 protocol which is too complex to use.

· Improved JavaScript embedding

JavaScript embedding in Java applications in the form of a runtime and lightweight JavaScript was available from Java 8. The responsibility of embedding was given to Project Nashorn. In Java 9, some improvements have been made to Project Nashorn. JDK 9 comprises a parser API aimed at the ECMAScript syntax tree of Project Nashorn. With the help of the API, Integrated Development Environments (IDE) and server-side frameworks can perform ECMAScript analysis without depending on Project Nashorn’s internal implementation classes.







Deprecation: Exploring deprecated features

爪哇 9 no longer supports the following features.

· Applet API

With the browser makers removing support for Java browser plug-ins keeping security considerations in mind and the HTML 5 arriving, the Applet API is deprecated. As alternative, software developers are asked to use the Java Web start which is used to launch applications from a browser. With Applet API, the appletviewer tool is also deprecated.

· Concurrent Mark Sweep (CMS) Garbage Collector

Though CMS stands deprecated from Java 9, support to versions already using the feature will be discontinued in future releases. CMS已被棄用,加快其他垃圾收集器在HotSpot虛擬機的發展,,en,CMS將通過低暫停G1垃圾收集器在長期被替換,,en,Java運行時環境,,en,選擇功能,,en,通過多JRE在運行時選擇JRE的能力,,en,Majra,,hi,功能即將停產,因為功能太複雜,,en,缺乏全面的文檔,並且很少使用,,en,該功能對Java啟動的並發執行,,en,從功能和增強功能,,en,在哪個Java移動可以推斷方向,,en,重點是敏捷和跟上時代,,en,該AOT和JVMCI旨在使編譯更快,提高性能,,en,模塊化是要幫助軟件企業組織自己的軟件項目更好,,en. CMS will be replaced by the low-pause G1 garbage collector on a long-term basis.

· Java Runtime Environment (JRE) selection feature

The ability to select a JRE at runtime via the Multiple JRE (mJRE) feature is being discontinued because the feature is too complex, lacks comprehensive documentation and is seldom used. The feature made the implementation of the Java Launcher complicated.

結論

From the features and enhancements, the direction at which Java is moving can be inferred. 很明顯, the emphasis is on nimbleness and keeping up with the times. The AOT and the JVMCI are designed to make compilation faster and improve performance. Modularity is going to help software companies organize their software projects better. 有一個明顯的強調網絡技術,,en,發行也不是沒有爭議,,en,人們在它的特點功效劃分,,en,德米特里·列斯科夫,,en,在Java技術供應商怡東營銷總監,,en,認為,AOT功能還不夠成熟,在市場上受到審判,,en,關於Java的更多信息,,en,可以在這裡找到,,en,Jwa9,,hi,介紹,,en,即將推出的Java ...,,en,仍然是在工作中狀態,因此,,en,沒有多少人知道它,,en,無論是什麼時候會推出日期,,en,一些重要的更新,它們有如下,,en,甲骨文已經提交了新的JDK增強提案,,en,收集對Java的的增強,這將構成Java的建議,,en,按照提供的最新報告,,en,下面的變化預計,,en,的LAMBDA功能改進,,en,更好的消歧,,en. 但, 爪哇 9 release is not without controversies. People are divided on the efficacy of its features. For example, Dmitry Leskov, marketing director at Java technology vendor Excelsior, thinks that the AOT feature is still not mature enough to be tried in the market.

More information on Java 9 can be found here Java9Java SE的 9 introduction








Coming soon…Java 10

爪哇 10 is still in the work-in-progress state and therefore, not much is known about it. Neither is the date when it will roll out. Still, some important updates are available which are given below.

Oracle has filed a new JDK Enhancement Proposal (JEP) to collect proposals towards enhancements of Java which will constitute the Java 10. As per the latest reports available, the following changes are expected.

  • Improvement of the Lambda functionality.
  • Better disambiguation.
  • 使用下劃線未使用的參數,,en,儘管上述變化與拉姆達功能,,en,他們是獨立的功能,,en,在此刻,,en,建議修改正在討論的一個或多個提案的可能性越來越修改或刪除,不能排除,,en,所提出的更改的簡短說明在下面給出,,en,LAMBDA功能是從Java列入,,en,向前,,en,由於種種原因,,en,不符合預期的表現,,en,Lambda表達式,,en,看起來,,en,會混淆軟件開發商誰是新的吧,,en,開發者會發現它令人沮喪,當編譯器沒有認識到Lambda表達式,,en,這個問題有望得到解決,,en,更多信息,,en,LAMBDA剩飯,,en,在過去的版本,,en.

Although the above changes are related to the Lambda functionality, they are independent functionalities. At this point, the proposed changes are being discussed and the possibility of one or more proposals getting modified or dropped cannot be ruled out.

A brief description of the proposed changes are given below.

Better disambiguation

Lambda functionality was included from Java 8 onwards. 但, due to various reasons, the performance was not as expected. Lambdas, it seemed, would confuse software developers who were new to it. Developers would find it frustrating when the compiler failed to recognize Lambdas. This problem is expected to be addressed.

More information on Lambda Leftovers

使用下劃線未使用的參數,,en,儘管上述變化與拉姆達功能,,en,他們是獨立的功能,,en,在此刻,,en,建議修改正在討論的一個或多個提案的可能性越來越修改或刪除,不能排除,,en,所提出的更改的簡短說明在下面給出,,en,LAMBDA功能是從Java列入,,en,向前,,en,由於種種原因,,en,不符合預期的表現,,en,Lambda表達式,,en,看起來,,en,會混淆軟件開發商誰是新的吧,,en,開發者會發現它令人沮喪,當編譯器沒有認識到Lambda表達式,,en,這個問題有望得到解決,,en,更多信息,,en,LAMBDA剩飯,,en,在過去的版本,,en

In the past versions, Lambdas would present itself with many different parameters although the software developer would not need all those parameters at a point in time. So, the developer would need to distinguish unused parameters. Underscores will help distinguishing the unused parameters.

You can find more information here http://openjdk.java.net/projects/jdk/10/








注意: We will keep this page updated/add new posts on Java 10 and upcoming versions/features. Please keep following.

標籤:
============================================= ============================================== 在亞馬遜上購買最佳技術書籍,en,電工CT Chestnutelectric,en
============================================== ---------------------------------------------------------------- electrician ct chestnutelectric
error

Enjoy this blog? Please spread the word :)

Follow by Email
LinkedIn
LinkedIn
Share