SlideShare a Scribd company logo
1 of 60
Download to read offline
What’s New in
Last Java Versions
About Me
u Majored in Applied Mathematics
u Cloud Technical Lead, Asia @ Ayla Networks (艾拉物聯)
u 21 years experience on Java, 25 years on programming
u Experience on Basic, C/C++, LPC, JavaScript, Python…
u JCConf 2014, 2016, 2017, 2018 speaker, TWJUG member
u 擔任過電腦資訊講師,並曾在加值簡訊服務商、遊戲雲端平台、全
球電⼦商務平台、資訊安全防護、使⽤者⾏為管理等公司中任職
u 負責程式撰寫、軟體設計、架構規劃及技術教學,並參與各式專案
設計、架構、開發、實作、測試、除錯、調效與維護
u 希望能⼀輩⼦玩技術寫程式到⽼
Agenda
u Version Changes
u JVM / Tools
u Class-Data Sharing (CDS)
u Garbage Collector
u Security
u I18N
u New APIs
u Syntax Sugar
Version Changes
Release Dates
u Java 8: 2014-03-18
u Java 9: 2017-09-21
u Java 10: 2018-03-20
u Java 11: 2018-09-25 (LTS)
u Java 12: 2019-03-19
u Java 13: 2019-09-17
u Java 14: 2020-03-17
u Java 15: 2020-09-xx
u Java 16: 2021-03-xx
u Java 17: 2021-09-xx (LTS)
Release Dates (Number of JEPs)
u Java 8: 2014-03-18 (55)
u Java 9: 2017-09-21 (91)
u Java 10: 2018-03-20 (12)
u Java 11: 2018-09-25 (17)
u Java 12: 2019-03-19 (8)
u Java 13: 2019-09-17 (5)
u Java 14: 2020-03-17 (3 - planning)
JVM / Tools
JVM / Tools
u 9 - JEP 243: Java-Level JVM Compiler Interface
u 10 – JEP 317: Experimental Java-Based JIT Compiler
u 11 – JEP 181: Nest-Based Access Control
u 11 – JEP 309: Dynamic Class-File Constants
u 11 – JEP 315: Improve AArch64 Intrinsics
u 11 – JEP 330: Launch Single-File Source-Code Programs
u 11 – JEP 331: Low-Overhead Heap Profiling
u 12 – JEP 230: Microbenchmark Suite
u 12 – JEP 340: One AArch64 Port, Not Two
u 14 – JEP 358: Helpful NullPointerExceptions
Experimental Java-Based JIT Compiler (Graal)
u Enable Graal to be used as an experimental JIT compiler,
starting with the Linux/x64 platform. Graal will use the
JVM compiler interface (JVMCI) introduced in JDK 9. Graal is
already in the JDK, so enabling it as an experimental JIT will
primarily be a testing and debugging effort
u To enable Graal as the JIT compiler, use the following
options on the java command line:
-XX:+UnlockExperimentalVMOptions 
-XX:+UseJVMCICompiler
Launch Single-File Source-Code Programs
Helpful NullPointerExceptions
u It’s very hard to troubleshooting the root cause now when
the following statements throw NullPointerExceptions:
u a.b.c.i = 99
u a[i][j][k] = 99
u a.i = b.j
Helpful NullPointerExceptions
u a.b.c.i = 99
u Exception in thread "main" java.lang.NullPointerException:
Cannot read field "c" because "a.b" is null
at Prog.main(Prog.java:5)
u a[i][j][k] = 99
u Exception in thread "main" java.lang.NullPointerException:
Cannot load from object array because "a[i][j]" is null
at Prog.main(Prog.java:5)
u a.i = b.j
u Exception in thread "main" java.lang.NullPointerException:
Cannot read field "j" because "b" is null
at Prog.main(Prog.java:5)
Class-Data Sharing (CDS)
Class-Data Sharing
u 5 - Class Data Sharing (CDS)
u 9 - JEP 250: Store Interned Strings in CDS Archives
u 10 – JEP 310: Application Class-Data Sharing
u 11 - Make -Xshare:auto the default for server VM
u 12 – JEP 341: Default CDS Archives
u 13 – JEP 350: Dynamic CDS Archives
Class-Data Sharing
u Class Data Sharing is intended to remove the fixed cost of
loading core classes at startup. It also allows some cached
files to be shared between JVMs which helps if you’re
running a lot of them, even if the JVMs are containerized.
u It only allows bootstrap class loader to load archived
system classes with serial garbage collector
Store Interned Strings in CDS Archives
u Reduce memory consumption by sharing the String objects and
underlying char array objects amongst different JVM processes
u Only support shared strings for the G1 GC. Shared strings
require a pinned region, and G1 is the only HotSpot GC that
supports pinning
u Only support 64-bit platforms with compressed object and class
pointers
Application Class-Data Sharing
u Application CDS extends CDS to allow the built-in system
class loader (a.k.a., the "app class loader"), the built-in
platform class loader, and custom class loaders to load
archived application classes with G1 garbage collector.
u java -Xshare:off -XX:+UseAppCDS 
-XX:DumpLoadedClassList=x.lst -cp x.jar HelloWorld
java -Xshare:dump -XX:+UseAppCDS 
-XX:SharedClassListFile=x.lst 
-XX:SharedArchiveFile=x.jsa -cp x.jar
java -Xshare:on -XX:+UseAppCDS 
-XX:SharedArchiveFile=x.jsa -cp x.jar HelloWorld
Default CDS Archives
u Enhance the JDK build process to generate a class data-sharing
(CDS) archive by default if not exist, using the default class list,
on 64-bit platforms.
u java -Xshare:dump
java -Xshare:on -cp x.jar HelloWorld
Default CDS Archives
Dynamic CDS Archives
u Extend AppCDS to allow the dynamic archiving of classes at the
end of Java application execution. The archived classes will
include all loaded application classes and library classes that
are not present in the default, base-layer CDS archive, without
doing one or more trial runs.
u Default CDS archive (+ dynamic archive)
u java -XX:ArchiveClassesAtExit=x.jsa -cp x.jar HelloWorld
java -XX:SharedArchiveFile=x.jsa -cp x.jar HelloWorld
Garbage Collector
Garbage Collector
u 9 – JEP 248: Make G1 the Default Garbage Collector
u 10 – JEP 304: Garbage-Collector Interface
u 11 – JEP 318: Epsilon: A No-Op Garbage Collector
u 11 – JEP 333: ZGC: A Scalable Low-Latency Garbage
Collector (Experimental)
u 12 – JEP 189: Shenandoah: A Low-Pause-Time Garbage
Collector (Experimental)
u 12 – JEP 344: Abortable Mixed Collections for G1
u 12 – JEP 346: Promptly Return Unused Committed Memory
from G1
u 13 – JEP 351: ZGC: Uncommit Unused Memory
Parallel Full GC for G1
u The G1 garbage collector is designed to avoid full
collections, but when the concurrent collections can't
reclaim memory fast enough a fall back full GC will occur.
u The implementation of the full GC for G1 uses a single
threaded mark-sweep-compact algorithm. We intend to
parallelize it and use the same number of threads as the
Young and Mixed collections do.
Abortable Mixed Collections for G1
u One goal of G1 is to meet a user supplied pause time target for
its collection pauses. G1 uses an engine to select the amount of
work to be done during a collection. The result of this selection
is a set of regions called the collection set.
u Once the collection has been started then G1 must collect all
live objects in all regions of the collection set without stopping,
which may exceed the pause time goal.
u Now G1 split the collection set into two parts, a mandatory
and an optional part. After G1 finishes collecting the mandatory
part, G1 starts collecting the optional part at a much more
granular level, if there is time left.
Promptly Return Unused Committed Memory from G1
u Enhance the G1 garbage collector to automatically return Java
heap memory to the operating system when idle.
u Currently the G1 only returns memory from the Java heap at
either a full GC or during a concurrent cycle, but G1 tries hard
to completely avoid full GCs, and only triggers a concurrent
cycle based on Java heap occupancy and allocation activity.
u G1 will, during inactivity of the application, periodically try to
continue or trigger a concurrent cycle to determine overall Java
heap usage. This will cause it to automatically return unused
portions of the Java heap back to the operating system.
Optionally, under user control, a full GC can be performed to
maximize the amount of memory returned.
Promptly Return Unused Committed Memory from G1
u The application is considered inactive, and G1 triggers a
periodic garbage collection if both:
uMore than G1PeriodicGCInterval milliseconds have passed
since any previous garbage collection pause and there is no
concurrent cycle in progress at this point. A value of zero
indicates that periodic garbage collections to promptly
reclaim memory are disabled.
uThe average one-minute system load value as returned by the
getloadavg() call on the JVM host system (e.g. container) is
below G1PeriodicGCSystemLoadThreshold. This condition
is ignored if G1PeriodicGCSystemLoadThreshold is zero.
Z Garbage Collector
u It supports TB-level GC with very low pause time (<10ms),
developed by Oracle.
u By convention, experimental features in the JVM are disabled
by default by the build system. ZGC, being an experimental
feature, will therefore not be present in a JDK build unless
explicitly enabled at compile-time using the configure option:
u --with-jvm-features=zgc
u To enable/use ZGC, the following JVM options will therefore be
needed:
u -XX:+UnlockExperimentalVMOptions 
-XX:+UseZGC
Shenandoah Garbage Collector
u It is a low-pause-time garbage collector from Red Hat, and
supports AArch64 and Amd64 architecture. It is also low-
pause-time. Unlike ZGC based on colored pointers,
Shenandoah GC uses brooks pointers.
u To enable it by using the following during building first:
u --with-jvm-features=“-shenandoahgc”
u Then use the following JVM options to enable:
u -XX:+UnlockExperimentalVMOptions 
-XX:+UseShenandoahGC
ZGC Uncommit Unused Memory
u ZGC was enhanced to return unused heap memory to the
operating system. This is useful for applications and
environments where memory footprint is a concern
u This feature is enabled by default, but can be explicitly
disabled using -XX:-ZUncommit
Security
Security
u 11 – JEP 324: Key Agreement with Curve25519 and
Curve448
u 11 – JEP 329: ChaCha20 and Poly1305 Cryptographic
Algorithms
u 11 - JEP 332: Transport Layer Security (TLS) 1.3
u 12 - ChaCha20 and Poly1305 TLS Cipher Suites
ChaCha20 and Poly1305 Cipher Suite
u TLS 1.2
uTLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
uTLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
uTLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256
u TLS 1.3
uTLS_CHACHA20_POLY1305_SHA256
I18N
I18N
u 8 - JEP 133: Unicode 6.2
u 9 – JEP 226: UTF-8 Property Resource Bundles
u 9 - JEP 227: Unicode 7.0
u 9 - JEP 267: Unicode 8.0
u 10 - JEP 314: Additional Unicode Language-Tag Extensions
u 11 - JEP 327: Unicode 10
u 12 – Unicode 11
u 12 - Square Character Support for Japanese New Era
u 13 – Unicode 12.1
UTF-8 Property Resource Bundles
u In Java SE 9, properties files are loaded in UTF-8 encoding. In
previous releases, ISO-8859-1 encoding was used for loading
property resource bundles.
u Most existing properties files should not be affected: UTF-8 and
ISO-8859-1 have the same encoding for ASCII characters, and
human-readable non-ASCII ISO-8859-1 encoding is not valid UTF-
8. If an invalid UTF-8 byte sequence is detected, the Java
runtime automatically rereads the file in ISO-8859-1.
u java.util.PropertyResourceBundle.encoding=ISO-8859-1
New Japanese New Era
New APIs
New APIs
u 11 – JEP 321: HTTP Client (Standard)
u 11 - JEP 328: Flight Recorder
u 11 - New APIs in String
u 12 - JEP 334: JVM Constants API
u 12 - Support for Compact Number Formatting
u 13 – JEP 353: Reimplement the Legacy Socket API
u 14 - JEP 349: JFR Event Streaming
u 14 – JEP 352: Non-Volatile Mapped Byte Buffers
Deprecated APIs
u 11 – JEP 320: Remove the Java EE and CORBA Modules
u 11 - JEP 335: Deprecate the Nashorn JavaScript Engine
u 11 - JEP 336: Deprecate the Pack200 Tools and API
HTTP Client
Flight Recorder – Goals
u Provide a low-overhead data collection framework for
troubleshooting Java applications and JVM.
uProvide APIs for producing and consuming data as events
uProvide a buffer mechanism and a binary data format
uAllow the configuration and filtering of events
uProvide events for the OS, the JVM, and the JDK libraries
u No measurable performance overhead when not enabled
Flight Recorder
u Modules: jdk.jfr, jdk.management.jfr
u Command: java -XX:StartFlightRecording ...
u Recordings may also be started and controlled using the
bin/jcmd tool:
u $ jcmd <pid> JFR.start
u $ jcmd <pid> JFR.dump filename=recording.jfr
u $ jcmd <pid> JFR.stop
New API in String
Support for Compact Number Formatting
Reimplement the Legacy Socket API
u The underlying implementations of java.net.Socket and
java.net.ServerSocket have been reimplemented. The
original used PlainSocketImpl from JDK1.0. Now they uses
NioSocketImpl
u Adding -Djdk.net.usePlainSocketImpl in JVM options can let
you use the old version of Socket API.
Syntax Sugar
Syntax Sugar
u 10 - JEP 286: Local-Variable Type Inference
u 11 - JEP 323: Local-Variable Syntax for Lambda Parameters
u 12 - JEP 325: Switch Expressions (Preview)
u 12 - JEP 326: Raw String Literals (Preview)
u 13 - JEP 354: Switch Expressions (Preview)
u 13 - JEP 355: Text Blocks (Preview)
Local-Variable Type Inference
Local-Variable Syntax for Lambda Parameters
Switch Expressions
Switch Expressions – Assignment
Switch Expressions – Spec
Switch Expressions in Java 12 (break)
Switch Expressions in Java 13 (yield)
Text Blocks
Text Blocks – Parameter
Text Blocks – New Line Difference
Text Blocks – Escape Character
Text Blocks - Indents
Thank you!

More Related Content

What's hot

Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Monica Beckwith
 
The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015craig lehmann
 
[JavaOne 2011] Models for Concurrent Programming
[JavaOne 2011] Models for Concurrent Programming[JavaOne 2011] Models for Concurrent Programming
[JavaOne 2011] Models for Concurrent ProgrammingTobias Lindaaker
 
Java collections the force awakens
Java collections  the force awakensJava collections  the force awakens
Java collections the force awakensRichardWarburton
 
Speculative Execution of Parallel Programs with Precise Exception Semantics ...
Speculative Execution of Parallel Programs with Precise Exception Semantics ...Speculative Execution of Parallel Programs with Precise Exception Semantics ...
Speculative Execution of Parallel Programs with Precise Exception Semantics ...Akihiro Hayashi
 
Introduction to OpenCL, 2010
Introduction to OpenCL, 2010Introduction to OpenCL, 2010
Introduction to OpenCL, 2010Tomasz Bednarz
 
Владимир Иванов. Java 8 и JVM: что нового в HotSpot
Владимир Иванов. Java 8 и JVM: что нового в HotSpotВладимир Иванов. Java 8 и JVM: что нового в HotSpot
Владимир Иванов. Java 8 и JVM: что нового в HotSpotVolha Banadyseva
 
Jvm profiling under the hood
Jvm profiling under the hoodJvm profiling under the hood
Jvm profiling under the hoodRichardWarburton
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisRuslan Shevchenko
 
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoWeaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoTaro L. Saito
 
Know yourengines velocity2011
Know yourengines velocity2011Know yourengines velocity2011
Know yourengines velocity2011Demis Bellot
 
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and CassandraBrief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and CassandraSomnath Mazumdar
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage CollectionHaim Yadid
 
Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016Chris Fregly
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Marcos García
 
"Making OpenCV Code Run Fast," a Presentation from Intel
"Making OpenCV Code Run Fast," a Presentation from Intel"Making OpenCV Code Run Fast," a Presentation from Intel
"Making OpenCV Code Run Fast," a Presentation from IntelEdge AI and Vision Alliance
 
Grand Central Dispatch - iOS Conf SG 2015
Grand Central Dispatch - iOS Conf SG 2015Grand Central Dispatch - iOS Conf SG 2015
Grand Central Dispatch - iOS Conf SG 2015Ben Asher
 
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020Johnny Sung
 

What's hot (20)

Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!
 
The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015The OMR GC talk - Ruby Kaigi 2015
The OMR GC talk - Ruby Kaigi 2015
 
[JavaOne 2011] Models for Concurrent Programming
[JavaOne 2011] Models for Concurrent Programming[JavaOne 2011] Models for Concurrent Programming
[JavaOne 2011] Models for Concurrent Programming
 
Java collections the force awakens
Java collections  the force awakensJava collections  the force awakens
Java collections the force awakens
 
Speculative Execution of Parallel Programs with Precise Exception Semantics ...
Speculative Execution of Parallel Programs with Precise Exception Semantics ...Speculative Execution of Parallel Programs with Precise Exception Semantics ...
Speculative Execution of Parallel Programs with Precise Exception Semantics ...
 
Introduction to OpenCL, 2010
Introduction to OpenCL, 2010Introduction to OpenCL, 2010
Introduction to OpenCL, 2010
 
Владимир Иванов. Java 8 и JVM: что нового в HotSpot
Владимир Иванов. Java 8 и JVM: что нового в HotSpotВладимир Иванов. Java 8 и JVM: что нового в HotSpot
Владимир Иванов. Java 8 и JVM: что нового в HotSpot
 
Jvm profiling under the hood
Jvm profiling under the hoodJvm profiling under the hood
Jvm profiling under the hood
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with this
 
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, TokyoWeaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
Weaving Dataflows with Silk - ScalaMatsuri 2014, Tokyo
 
Know yourengines velocity2011
Know yourengines velocity2011Know yourengines velocity2011
Know yourengines velocity2011
 
NvFX GTC 2013
NvFX GTC 2013NvFX GTC 2013
NvFX GTC 2013
 
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and CassandraBrief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
Brief introduction on Hadoop,Dremel, Pig, FlumeJava and Cassandra
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage Collection
 
Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016Advanced Spark and TensorFlow Meetup May 26, 2016
Advanced Spark and TensorFlow Meetup May 26, 2016
 
camel-scala.pdf
camel-scala.pdfcamel-scala.pdf
camel-scala.pdf
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
 
"Making OpenCV Code Run Fast," a Presentation from Intel
"Making OpenCV Code Run Fast," a Presentation from Intel"Making OpenCV Code Run Fast," a Presentation from Intel
"Making OpenCV Code Run Fast," a Presentation from Intel
 
Grand Central Dispatch - iOS Conf SG 2015
Grand Central Dispatch - iOS Conf SG 2015Grand Central Dispatch - iOS Conf SG 2015
Grand Central Dispatch - iOS Conf SG 2015
 
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
 

Similar to TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions

State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020Jelastic Multi-Cloud PaaS
 
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...
Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...Jelastic Multi-Cloud PaaS
 
Choosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageChoosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageJelastic Multi-Cloud PaaS
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance TuningJeremy Leisy
 
Software Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsSoftware Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsIsuru Perera
 
Tuning Java for Big Data
Tuning Java for Big DataTuning Java for Big Data
Tuning Java for Big DataScott Seighman
 
Master your java_applications_in_kubernetes
Master your java_applications_in_kubernetesMaster your java_applications_in_kubernetes
Master your java_applications_in_kubernetesAndy Moncsek
 
The JVM in the Cloud: OpenJ9 and the traditional HotSpot JVM
The JVM in the Cloud: OpenJ9 and the traditional HotSpot JVMThe JVM in the Cloud: OpenJ9 and the traditional HotSpot JVM
The JVM in the Cloud: OpenJ9 and the traditional HotSpot JVMAndy Moncsek
 
Java and Containers - Make it Awesome !
Java and Containers - Make it Awesome !Java and Containers - Make it Awesome !
Java and Containers - Make it Awesome !Dinakar Guniguntala
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18Jorge Hidalgo
 
Garbage collectors and Memory Leaks in Nodejs - V8
Garbage collectors and Memory Leaks in Nodejs - V8Garbage collectors and Memory Leaks in Nodejs - V8
Garbage collectors and Memory Leaks in Nodejs - V8Thien Ly
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Vadym Kazulkin
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderIsuru Perera
 
GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22Jorge Hidalgo
 
Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Petr Zapletal
 
Java and Container - Make it Awesome !
Java and Container - Make it Awesome !Java and Container - Make it Awesome !
Java and Container - Make it Awesome !Dinakar Guniguntala
 
ContainerWorkloadwithSemeru.pdf
ContainerWorkloadwithSemeru.pdfContainerWorkloadwithSemeru.pdf
ContainerWorkloadwithSemeru.pdfSumanMitra22
 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaIsuru Perera
 
It's always sunny with OpenJ9
It's always sunny with OpenJ9It's always sunny with OpenJ9
It's always sunny with OpenJ9DanHeidinga
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Sylvain Wallez
 

Similar to TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions (20)

State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
State of Java Elasticity. Tuning Java Efficiency - GIDS.JAVA LIVE 2020
 
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...
Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...Elastic JVM  for Scalable Java EE Applications  Running in Containers #Jakart...
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...
 
Choosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageChoosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
Choosing Right Garbage Collector to Increase Efficiency of Java Memory Usage
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
 
Software Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsSoftware Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and Flamegraphs
 
Tuning Java for Big Data
Tuning Java for Big DataTuning Java for Big Data
Tuning Java for Big Data
 
Master your java_applications_in_kubernetes
Master your java_applications_in_kubernetesMaster your java_applications_in_kubernetes
Master your java_applications_in_kubernetes
 
The JVM in the Cloud: OpenJ9 and the traditional HotSpot JVM
The JVM in the Cloud: OpenJ9 and the traditional HotSpot JVMThe JVM in the Cloud: OpenJ9 and the traditional HotSpot JVM
The JVM in the Cloud: OpenJ9 and the traditional HotSpot JVM
 
Java and Containers - Make it Awesome !
Java and Containers - Make it Awesome !Java and Containers - Make it Awesome !
Java and Containers - Make it Awesome !
 
GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18GraalVM - OpenSlava 2019-10-18
GraalVM - OpenSlava 2019-10-18
 
Garbage collectors and Memory Leaks in Nodejs - V8
Garbage collectors and Memory Leaks in Nodejs - V8Garbage collectors and Memory Leaks in Nodejs - V8
Garbage collectors and Memory Leaks in Nodejs - V8
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight Recorder
 
GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22GraalVM - MadridJUG 2019-10-22
GraalVM - MadridJUG 2019-10-22
 
Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018
 
Java and Container - Make it Awesome !
Java and Container - Make it Awesome !Java and Container - Make it Awesome !
Java and Container - Make it Awesome !
 
ContainerWorkloadwithSemeru.pdf
ContainerWorkloadwithSemeru.pdfContainerWorkloadwithSemeru.pdf
ContainerWorkloadwithSemeru.pdf
 
Software Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in JavaSoftware Profiling: Understanding Java Performance and how to profile in Java
Software Profiling: Understanding Java Performance and how to profile in Java
 
It's always sunny with OpenJ9
It's always sunny with OpenJ9It's always sunny with OpenJ9
It's always sunny with OpenJ9
 
Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!Inside the JVM - Follow the white rabbit!
Inside the JVM - Follow the white rabbit!
 

More from Joseph Kuo

JCConf 2023 - 深入淺出 Java 21 功能
JCConf 2023 - 深入淺出 Java 21 功能JCConf 2023 - 深入淺出 Java 21 功能
JCConf 2023 - 深入淺出 Java 21 功能Joseph Kuo
 
JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19Joseph Kuo
 
JCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTSJCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTSJoseph Kuo
 
JCConf 2017 - Next Generation of Cloud Computing: Edge Computing and Apache E...
JCConf 2017 - Next Generation of Cloud Computing: Edge Computing and Apache E...JCConf 2017 - Next Generation of Cloud Computing: Edge Computing and Apache E...
JCConf 2017 - Next Generation of Cloud Computing: Edge Computing and Apache E...Joseph Kuo
 
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJoseph Kuo
 
Establish The Core of Cloud Computing Application by Using Hazelcast (Chinese)
Establish The Core of  Cloud Computing Application  by Using Hazelcast (Chinese)Establish The Core of  Cloud Computing Application  by Using Hazelcast (Chinese)
Establish The Core of Cloud Computing Application by Using Hazelcast (Chinese)Joseph Kuo
 

More from Joseph Kuo (6)

JCConf 2023 - 深入淺出 Java 21 功能
JCConf 2023 - 深入淺出 Java 21 功能JCConf 2023 - 深入淺出 Java 21 功能
JCConf 2023 - 深入淺出 Java 21 功能
 
JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19
 
JCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTSJCConf 2021 - Java17: The Next LTS
JCConf 2021 - Java17: The Next LTS
 
JCConf 2017 - Next Generation of Cloud Computing: Edge Computing and Apache E...
JCConf 2017 - Next Generation of Cloud Computing: Edge Computing and Apache E...JCConf 2017 - Next Generation of Cloud Computing: Edge Computing and Apache E...
JCConf 2017 - Next Generation of Cloud Computing: Edge Computing and Apache E...
 
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and IgniteJCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
JCConf 2016 - Cloud Computing Applications - Hazelcast, Spark and Ignite
 
Establish The Core of Cloud Computing Application by Using Hazelcast (Chinese)
Establish The Core of  Cloud Computing Application  by Using Hazelcast (Chinese)Establish The Core of  Cloud Computing Application  by Using Hazelcast (Chinese)
Establish The Core of Cloud Computing Application by Using Hazelcast (Chinese)
 

Recently uploaded

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 

Recently uploaded (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 

TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions

  • 1. What’s New in Last Java Versions
  • 2. About Me u Majored in Applied Mathematics u Cloud Technical Lead, Asia @ Ayla Networks (艾拉物聯) u 21 years experience on Java, 25 years on programming u Experience on Basic, C/C++, LPC, JavaScript, Python… u JCConf 2014, 2016, 2017, 2018 speaker, TWJUG member u 擔任過電腦資訊講師,並曾在加值簡訊服務商、遊戲雲端平台、全 球電⼦商務平台、資訊安全防護、使⽤者⾏為管理等公司中任職 u 負責程式撰寫、軟體設計、架構規劃及技術教學,並參與各式專案 設計、架構、開發、實作、測試、除錯、調效與維護 u 希望能⼀輩⼦玩技術寫程式到⽼
  • 3. Agenda u Version Changes u JVM / Tools u Class-Data Sharing (CDS) u Garbage Collector u Security u I18N u New APIs u Syntax Sugar
  • 5. Release Dates u Java 8: 2014-03-18 u Java 9: 2017-09-21 u Java 10: 2018-03-20 u Java 11: 2018-09-25 (LTS) u Java 12: 2019-03-19 u Java 13: 2019-09-17 u Java 14: 2020-03-17 u Java 15: 2020-09-xx u Java 16: 2021-03-xx u Java 17: 2021-09-xx (LTS)
  • 6. Release Dates (Number of JEPs) u Java 8: 2014-03-18 (55) u Java 9: 2017-09-21 (91) u Java 10: 2018-03-20 (12) u Java 11: 2018-09-25 (17) u Java 12: 2019-03-19 (8) u Java 13: 2019-09-17 (5) u Java 14: 2020-03-17 (3 - planning)
  • 8. JVM / Tools u 9 - JEP 243: Java-Level JVM Compiler Interface u 10 – JEP 317: Experimental Java-Based JIT Compiler u 11 – JEP 181: Nest-Based Access Control u 11 – JEP 309: Dynamic Class-File Constants u 11 – JEP 315: Improve AArch64 Intrinsics u 11 – JEP 330: Launch Single-File Source-Code Programs u 11 – JEP 331: Low-Overhead Heap Profiling u 12 – JEP 230: Microbenchmark Suite u 12 – JEP 340: One AArch64 Port, Not Two u 14 – JEP 358: Helpful NullPointerExceptions
  • 9. Experimental Java-Based JIT Compiler (Graal) u Enable Graal to be used as an experimental JIT compiler, starting with the Linux/x64 platform. Graal will use the JVM compiler interface (JVMCI) introduced in JDK 9. Graal is already in the JDK, so enabling it as an experimental JIT will primarily be a testing and debugging effort u To enable Graal as the JIT compiler, use the following options on the java command line: -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler
  • 11. Helpful NullPointerExceptions u It’s very hard to troubleshooting the root cause now when the following statements throw NullPointerExceptions: u a.b.c.i = 99 u a[i][j][k] = 99 u a.i = b.j
  • 12. Helpful NullPointerExceptions u a.b.c.i = 99 u Exception in thread "main" java.lang.NullPointerException: Cannot read field "c" because "a.b" is null at Prog.main(Prog.java:5) u a[i][j][k] = 99 u Exception in thread "main" java.lang.NullPointerException: Cannot load from object array because "a[i][j]" is null at Prog.main(Prog.java:5) u a.i = b.j u Exception in thread "main" java.lang.NullPointerException: Cannot read field "j" because "b" is null at Prog.main(Prog.java:5)
  • 14. Class-Data Sharing u 5 - Class Data Sharing (CDS) u 9 - JEP 250: Store Interned Strings in CDS Archives u 10 – JEP 310: Application Class-Data Sharing u 11 - Make -Xshare:auto the default for server VM u 12 – JEP 341: Default CDS Archives u 13 – JEP 350: Dynamic CDS Archives
  • 15. Class-Data Sharing u Class Data Sharing is intended to remove the fixed cost of loading core classes at startup. It also allows some cached files to be shared between JVMs which helps if you’re running a lot of them, even if the JVMs are containerized. u It only allows bootstrap class loader to load archived system classes with serial garbage collector
  • 16. Store Interned Strings in CDS Archives u Reduce memory consumption by sharing the String objects and underlying char array objects amongst different JVM processes u Only support shared strings for the G1 GC. Shared strings require a pinned region, and G1 is the only HotSpot GC that supports pinning u Only support 64-bit platforms with compressed object and class pointers
  • 17. Application Class-Data Sharing u Application CDS extends CDS to allow the built-in system class loader (a.k.a., the "app class loader"), the built-in platform class loader, and custom class loaders to load archived application classes with G1 garbage collector. u java -Xshare:off -XX:+UseAppCDS -XX:DumpLoadedClassList=x.lst -cp x.jar HelloWorld java -Xshare:dump -XX:+UseAppCDS -XX:SharedClassListFile=x.lst -XX:SharedArchiveFile=x.jsa -cp x.jar java -Xshare:on -XX:+UseAppCDS -XX:SharedArchiveFile=x.jsa -cp x.jar HelloWorld
  • 18. Default CDS Archives u Enhance the JDK build process to generate a class data-sharing (CDS) archive by default if not exist, using the default class list, on 64-bit platforms. u java -Xshare:dump java -Xshare:on -cp x.jar HelloWorld
  • 20. Dynamic CDS Archives u Extend AppCDS to allow the dynamic archiving of classes at the end of Java application execution. The archived classes will include all loaded application classes and library classes that are not present in the default, base-layer CDS archive, without doing one or more trial runs. u Default CDS archive (+ dynamic archive) u java -XX:ArchiveClassesAtExit=x.jsa -cp x.jar HelloWorld java -XX:SharedArchiveFile=x.jsa -cp x.jar HelloWorld
  • 22. Garbage Collector u 9 – JEP 248: Make G1 the Default Garbage Collector u 10 – JEP 304: Garbage-Collector Interface u 11 – JEP 318: Epsilon: A No-Op Garbage Collector u 11 – JEP 333: ZGC: A Scalable Low-Latency Garbage Collector (Experimental) u 12 – JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental) u 12 – JEP 344: Abortable Mixed Collections for G1 u 12 – JEP 346: Promptly Return Unused Committed Memory from G1 u 13 – JEP 351: ZGC: Uncommit Unused Memory
  • 23. Parallel Full GC for G1 u The G1 garbage collector is designed to avoid full collections, but when the concurrent collections can't reclaim memory fast enough a fall back full GC will occur. u The implementation of the full GC for G1 uses a single threaded mark-sweep-compact algorithm. We intend to parallelize it and use the same number of threads as the Young and Mixed collections do.
  • 24. Abortable Mixed Collections for G1 u One goal of G1 is to meet a user supplied pause time target for its collection pauses. G1 uses an engine to select the amount of work to be done during a collection. The result of this selection is a set of regions called the collection set. u Once the collection has been started then G1 must collect all live objects in all regions of the collection set without stopping, which may exceed the pause time goal. u Now G1 split the collection set into two parts, a mandatory and an optional part. After G1 finishes collecting the mandatory part, G1 starts collecting the optional part at a much more granular level, if there is time left.
  • 25. Promptly Return Unused Committed Memory from G1 u Enhance the G1 garbage collector to automatically return Java heap memory to the operating system when idle. u Currently the G1 only returns memory from the Java heap at either a full GC or during a concurrent cycle, but G1 tries hard to completely avoid full GCs, and only triggers a concurrent cycle based on Java heap occupancy and allocation activity. u G1 will, during inactivity of the application, periodically try to continue or trigger a concurrent cycle to determine overall Java heap usage. This will cause it to automatically return unused portions of the Java heap back to the operating system. Optionally, under user control, a full GC can be performed to maximize the amount of memory returned.
  • 26. Promptly Return Unused Committed Memory from G1 u The application is considered inactive, and G1 triggers a periodic garbage collection if both: uMore than G1PeriodicGCInterval milliseconds have passed since any previous garbage collection pause and there is no concurrent cycle in progress at this point. A value of zero indicates that periodic garbage collections to promptly reclaim memory are disabled. uThe average one-minute system load value as returned by the getloadavg() call on the JVM host system (e.g. container) is below G1PeriodicGCSystemLoadThreshold. This condition is ignored if G1PeriodicGCSystemLoadThreshold is zero.
  • 27. Z Garbage Collector u It supports TB-level GC with very low pause time (<10ms), developed by Oracle. u By convention, experimental features in the JVM are disabled by default by the build system. ZGC, being an experimental feature, will therefore not be present in a JDK build unless explicitly enabled at compile-time using the configure option: u --with-jvm-features=zgc u To enable/use ZGC, the following JVM options will therefore be needed: u -XX:+UnlockExperimentalVMOptions -XX:+UseZGC
  • 28. Shenandoah Garbage Collector u It is a low-pause-time garbage collector from Red Hat, and supports AArch64 and Amd64 architecture. It is also low- pause-time. Unlike ZGC based on colored pointers, Shenandoah GC uses brooks pointers. u To enable it by using the following during building first: u --with-jvm-features=“-shenandoahgc” u Then use the following JVM options to enable: u -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC
  • 29. ZGC Uncommit Unused Memory u ZGC was enhanced to return unused heap memory to the operating system. This is useful for applications and environments where memory footprint is a concern u This feature is enabled by default, but can be explicitly disabled using -XX:-ZUncommit
  • 31. Security u 11 – JEP 324: Key Agreement with Curve25519 and Curve448 u 11 – JEP 329: ChaCha20 and Poly1305 Cryptographic Algorithms u 11 - JEP 332: Transport Layer Security (TLS) 1.3 u 12 - ChaCha20 and Poly1305 TLS Cipher Suites
  • 32. ChaCha20 and Poly1305 Cipher Suite u TLS 1.2 uTLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 uTLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 uTLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 u TLS 1.3 uTLS_CHACHA20_POLY1305_SHA256
  • 33. I18N
  • 34. I18N u 8 - JEP 133: Unicode 6.2 u 9 – JEP 226: UTF-8 Property Resource Bundles u 9 - JEP 227: Unicode 7.0 u 9 - JEP 267: Unicode 8.0 u 10 - JEP 314: Additional Unicode Language-Tag Extensions u 11 - JEP 327: Unicode 10 u 12 – Unicode 11 u 12 - Square Character Support for Japanese New Era u 13 – Unicode 12.1
  • 35. UTF-8 Property Resource Bundles u In Java SE 9, properties files are loaded in UTF-8 encoding. In previous releases, ISO-8859-1 encoding was used for loading property resource bundles. u Most existing properties files should not be affected: UTF-8 and ISO-8859-1 have the same encoding for ASCII characters, and human-readable non-ASCII ISO-8859-1 encoding is not valid UTF- 8. If an invalid UTF-8 byte sequence is detected, the Java runtime automatically rereads the file in ISO-8859-1. u java.util.PropertyResourceBundle.encoding=ISO-8859-1
  • 38. New APIs u 11 – JEP 321: HTTP Client (Standard) u 11 - JEP 328: Flight Recorder u 11 - New APIs in String u 12 - JEP 334: JVM Constants API u 12 - Support for Compact Number Formatting u 13 – JEP 353: Reimplement the Legacy Socket API u 14 - JEP 349: JFR Event Streaming u 14 – JEP 352: Non-Volatile Mapped Byte Buffers
  • 39. Deprecated APIs u 11 – JEP 320: Remove the Java EE and CORBA Modules u 11 - JEP 335: Deprecate the Nashorn JavaScript Engine u 11 - JEP 336: Deprecate the Pack200 Tools and API
  • 41. Flight Recorder – Goals u Provide a low-overhead data collection framework for troubleshooting Java applications and JVM. uProvide APIs for producing and consuming data as events uProvide a buffer mechanism and a binary data format uAllow the configuration and filtering of events uProvide events for the OS, the JVM, and the JDK libraries u No measurable performance overhead when not enabled
  • 42. Flight Recorder u Modules: jdk.jfr, jdk.management.jfr u Command: java -XX:StartFlightRecording ... u Recordings may also be started and controlled using the bin/jcmd tool: u $ jcmd <pid> JFR.start u $ jcmd <pid> JFR.dump filename=recording.jfr u $ jcmd <pid> JFR.stop
  • 43. New API in String
  • 44. Support for Compact Number Formatting
  • 45. Reimplement the Legacy Socket API u The underlying implementations of java.net.Socket and java.net.ServerSocket have been reimplemented. The original used PlainSocketImpl from JDK1.0. Now they uses NioSocketImpl u Adding -Djdk.net.usePlainSocketImpl in JVM options can let you use the old version of Socket API.
  • 47. Syntax Sugar u 10 - JEP 286: Local-Variable Type Inference u 11 - JEP 323: Local-Variable Syntax for Lambda Parameters u 12 - JEP 325: Switch Expressions (Preview) u 12 - JEP 326: Raw String Literals (Preview) u 13 - JEP 354: Switch Expressions (Preview) u 13 - JEP 355: Text Blocks (Preview)
  • 49. Local-Variable Syntax for Lambda Parameters
  • 53. Switch Expressions in Java 12 (break)
  • 54. Switch Expressions in Java 13 (yield)
  • 56. Text Blocks – Parameter
  • 57. Text Blocks – New Line Difference
  • 58. Text Blocks – Escape Character
  • 59. Text Blocks - Indents