JEP 343: Packaging Tool (Incubator)
Who would’ve thought we’d start to miss JavaFX again? With JDK 8, a tool called javapackager was released as part of the JavaFX kit. However, after JavaFX split from Java with the release of JDK 11, the popular javapackager was no longer available.
The packaging tool ensured that Java applications could be packaged in such a way that they could be installed like all other programs. For Windows users, for example, *.exe files could be created and their Java application installed by double-clicking. Since the tool is sorely missed, a new tool called jpackage is to pick up the mantle. For more additional info Java Online Training
Users can finally create their own Java installation files again, based on the Java application and a runtime image. The tool takes this input and creates an image of a Java application that contains all dependencies (formats: msi, exe, pkg in a dmg, app in a dmg, deb and rpm).
JFR Event Streaming: provides an API for the continuous consumption of JFR data from both in-process and out-of-process applications. JFR is a tool for collecting profiling and diagnostic data about a running Java application. The event streaming proposal records the same set of events as for the non-streaming case, with overhead of less than one percent if possible.
Event streaming must co-exist with non-streaming recordings, both disk-based and memory-based. Motivating this proposal is a situation in which the HotSpot VM emits more than 500 data points using JFR, most of them available only by parsing log files.
Currently, a user must start a recording, stop it, dump the contents to disk, and then parse the recording file. This works well for application profiling, but not for monitoring purposes. An example of monitoring usage is a dashboard that displays dynamic updates to data. Learn more practical skills from Java Online Course
There is overhead with creating a recording, such as copying data from the disk repository to a separate recording file. If there were a way to read data being recorded from the disk repository without creating a new recording file, much of the overhead could be avoided.
Pattern Matching for instanceof
Offered in preview mode, this new feature aims to improve Java by providing to users pattern matching for the instanceof operator. Already present in other languages, pattern matching makes it possible to express the logic of a program in a more secure and concise way.
The pattern matching for the instanceof operator will facilitate the conditional extraction of components from objects.
Second Preview of Text Blocks
Introduced in preview mode with Java 13, text blocks return with a second preview in Java 14. The feedback from the community following the release in Java 13 has been taken into account with the addition of two new escape sequences.
Introduction of the Record Type
Java 14 should see the introduction in preview mode of the record type. Record objects allow a compact syntax to declare classes which are transparent holders for shallowly immutable data.
Like an enum, a record is a restricted form of a class. A record declares its representation and commits to an API that corresponds to this representation. Record objects give up a freedom that Java classes benefit from: the ability to decouple the API from the representation. In return, the records offer a significant gain in terms of brevity.
Text je súčasťou Refresher Blogu, nie je redakčným obsahom. Administrátorov môžete kontaktovať na email@example.com.
Chceš vedieť, keď Siva Cynix it pridá nový blog?
Zadaj svoj mail a dostaneš upozornenie. Kedykoľvek sa môžeš odhlásiť.