The latest version of Java is expected to be released on March 19, after having been in its Release-Candidate Phase since February 7. The following is a list of features that will be added or changed in Java 12:
- Shenandoah: A Low-Pause-Time Garbage Collector (GC): Shenandoah will reduce GC pause times by running evacuation work concurrently with running Java threads. This will be an experimental feature.
- Microbenchmark Suite: The JDK source code will get a basic suite of microbenchmarks, which will make it easy for developers to run existing microbenchmarks or create new ones.
- Switch Expressions: An extension of the switch statement that will allow it to be used as either a statement or an expression. According to Oracle, both forms can use a “traditional” or “simplified” scoping and control flow behavior. This preview feature will simplify everyday coding and will prepare developers to use pattern matching in switch.
- JVM Constraints API: This API will model nominal descriptions of key class-file and run-time artifacts, Oracle’s website explained.
- One AArch64 Port: Oracle will be removing all sources relating to the arm64 port, keeping only the 32-bit ARM port and the 64-bit aarch64 port. By removing the arm64 port, contributors will be encouraged to focus their efforts on a single implementation, Oracle explained.
- Default CDS Archives: Oracle will enhance the JDK build process to create a class data-sharing (CDS) archive, which will improve out-of-the-box startup time.
- Abortable Mixed Collections for G1: This will make it possible to adoort G1 mixed collections if they will exceed the pause target.
- Promptly Return Unused Committed Memory from G1: Oracle is enhancing the G1 GC so that it automatically returns Java heap memory to the operating system if idle.
Related content: Making Java a modern language
“Java’s development is, in many ways, a bellwether for the developer community as a whole,” said Sky Guo, CEO of Cypherium, a smart contract platform. “With the largest developer community in the world, Java must proceed delicately when it comes to updates and new releases, as the objective of these new releases is often to maintain loyalty and interest without rocking the boat. More often than not, this means facilitating integration before groundbreaking innovation. From the perspective of blockchain integration — particularly with projects like Cypherium that support Java in a number of ways — these upgrades are invaluable in accelerating mainstream acceptance and adoption.”