SlideShare a Scribd company logo
© Copyright Azul Systems 2018
© Copyright Azul Systems 2015
@speakjava
JDK 9, 10, 11 and Beyond:
Delivering New Features in the JDK
Simon Ritter
Deputy CTO, Azul Systems
1
© Copyright Azul Systems 2018
JDK 9: Big And Small Changes
2
© Copyright Azul Systems 2018
Java Platform Module System (JPMS)
 The core Java libraries are now a set of modules (JEP 220)
– 75 OpenJDK modules: 27 Java SE, 48 JDK
– Oracle JDK: 14 additional JDK, 8 JavaFX, 2 Oracle specific
 Most internal APIs now encapsulated (JEP 260)
– sun.misc.Unsafe
– Some can be used with command line options
3
© Copyright Azul Systems 2018
jlink: The Java Linker (JEP 282)
4
Modular run-time
image
…confbin
jlink
$ jlink --modulepath $JDKMODS 
--addmods java.base –output myimage
$ myimage/bin/java –-list-modules
java.base@9
lib
© Copyright Azul Systems 2018
jlink: The Java Linker (JEP 282)
$ jlink --module-path $JDKMODS:$MYMODS 
--addmods com.azul.zapp –-output myimage
$ myimage/bin/java –-list-modules
java.base@9
java.logging@9
java.sql@9
java.xml@9
com.azul.zapp@1.0
com.azul.zoop@1.0
com.azul.zeta@1.0
© Copyright Azul Systems 2018
Moving Java Forward Faster
© Copyright Azul Systems 2018
Java Platform Development
 Development of releases takes time
– JDK 6: 2 years and 2 months after JDK 5
– JDK 7: 4 years and 8 months after JDK 6
– JDK 8: 2 years and 8 months after JDK 7
– JDK 9: 3 years and 6 months after JDK 8
7
© Copyright Azul Systems 2018
Migrating To A New Version
 Plenty of time to continue with previous release
– JDK 6: 2 years and 11 months of public JDK 5 updates
– JDK 7: 1 year and 9 months of public JDK 6 updates
– JDK 8: 1 year and 1 month of public JDK 7 updates
 Also allows for stabilisation of new platform before
migrating applications in production
8
© Copyright Azul Systems 2018
The Java Platform Today
9
Stable
Secure
Free
© Copyright Azul Systems 2018
OpenJDK: New Release Model
 A new version of the JDK will be released every six months
– March and September
– Started this year with JDK 10 and JDK 11
 OpenJDK development will be more agile
– Previous target was a release every two years
 Features will be included only when ready
– Targeted for a release when feature complete
10
© Copyright Azul Systems 2018
Long Term Support Releases
 Long term support for all releases is not practical
– One Long Term Support (LTS) release every three years
 JDK 8 has been classified as an LTS release
 JDK 8 public updates stop in January 2019 for commercial users
 Non-commercial users get updates until December 2020
 Next LTS release is JDK 11
 JDK 9 and JDK 10 are feature releases
 Updates for only six months
11
© Copyright Azul Systems 2018
Which JDK Binary
 Traditional Oracle branded binary (java.oracle.com)
– Oracle Binary Code License (FoU restrictions)
 New OpenJDK binary (jdk.java.net)
– GPLv2 with CPE license (no restrictions)
– Security and bug fix updates only for six months
 Only until next JDK release
 Two scheduled updates
– No overlap of updates for previous version
12
© Copyright Azul Systems 2018
Converged Binaries
Oracle JDK
OpenJDK
Java SE
JDK 10 and earlier
Java SE
OpenJDK
& Oracle JDK
JDK 11 and later
© Copyright Azul Systems 2018
Converged Binaries (JDK 11)
 Some closed-source parts of the JDK will be open-sourced
– Flight recorder
– Mission control ✔
– Others ✔
 Other closed-source parts will be removed
– Browser Plugin
– Java Web Start
– JavaFX
14
© Copyright Azul Systems 2018
JDK 9 Onwards And Compatibility
15
"Clean applications that just depend on java.se
should just work" - Oracle
© Copyright Azul Systems 2018
JDK 9: The Clean Up Starts
 JDK 9 was a significant change for Java
– Deprecated APIs were removed for the first time
 Six methods and one class
 JDK 10 removed 1 package, 6 classes, 9 methods and 1 field
– Redundant features eliminated
 jhat tool, JVM TI hprof agent
 Numerous deprecated GC options removed
– Significant command line changes
 JDK 9 removed 187 -XX flags
 JDK 10 removed 36 -XX flags
16
© Copyright Azul Systems 2018
Housekeeping Will Continue
 More significant removals in JDK 11
– Applets, Browser Plugin, Web Start, JavaFX
– java.se.ee meta-module
 java.corba
 java.transaction
 java.activation
 java.xml.bind
 java.xml.ws
 java.xml.ws.annotation
 More in the future
– Nashorn deprecated, CMS garbage collector?
17
© Copyright Azul Systems 2018
Compatibility Not Guaranteed
 New versions of Java may include breaking changes
– Anything for removal will be deprecated first
– Minimum of one release warning
 Could be only six months
18
© Copyright Azul Systems 2018
Eliminating Confusion
 There will be an LTS release every three years
– This does NOT mean 3 years of free updates
 Oracle JDK (from JDK 11) can ONLY be used in production
with a commercial support contract
– The only free JDK 11 and later will be OpenJDK binaries
 To continue to receive free updates to the JDK you MUST
update your JDK EVERY SIX MONTHS
 JDK 8 can be used indefinitely for free
– But without any further security patches and bug fixes
19
© Copyright Azul Systems 2018
New JDK Update Schedule
© Copyright Azul Systems 2018
The Java Platform Soon
21
Stable
Secure
Free
Choose two out of three
© Copyright Azul Systems 2018
JDK 10
© Copyright Azul Systems 2018
Local Variable Type Inference
 JEP 286
– Simple use cases
– Style guidelines available
– Good (appropriate use of variable name)
– Poor
 Infered type is PriorityQueue<Object>
23
var list = new ArrayList<String>(); // infers ArrayList<String>
var stream = list.stream(); // infers Stream<String>
var stringList = List.of("a", "b", "c");
var itemQueue = new PriorityQueue<>();
© Copyright Azul Systems 2018
JDK 10: JEPs
 JEP 307: Parallel Full GC for G1
– Still a full GC with potentially big pauses
 JEP 310: Application Class-Data Sharing
– Previous commercial Oracle feature
 JEP 317: Experimental Java-based JIT compiler (Graal)
 JEP 319: Root Certificates
– default set of root CA certificates
 JEP 296: Consolidate JDK forests into single repo
– Eight repos becomes one
24
© Copyright Azul Systems 2018
JDK 10: JEPs
 JEP 316: Heap allocation on alternative devices (Intel)
– NV-RAM with same semantics as DRAM
 JEP 313: Remove javah tool
– Same functionality through javac
 JEP 304: Garbage Collector Interface (Red Hat)
– Easier to add new algorithms (JVM internal)
 JEP 312: Thread-Local Handshakes
– Execute callbacks on threads without performing a global
VM safepoint
25
© Copyright Azul Systems 2018
JDK 10: APIs
 73 New APIs
– List, Set, Map.copyOf(Collection)
– Collectors
 toUnmodifiableList
 toUnmodifiableMap
 toUnmodifiableSet
– Optional.orElseThrow()
26
© Copyright Azul Systems 2018
JDK 10: Miscellaneous
 XMLInputFactory.newFactory() de-deprecated
(precated?)
 com.sun.security.auth package
– Six deprecated classes removed
 java.lang.SecurityManager
– One deprecated field and seven methods removed
 JVM now more Docker container aware
– Uses container CPU count and memory size
– Namespace issues resolved (pids)
27
© Copyright Azul Systems 2018
JDK 11
© Copyright Azul Systems 2018
JDK 11
 17 JEPs
 3 from outside Oracle
– JEP 318: Epsilon garbage collector (Red Hat)
– JEP 315: Improve Aarch64 intrinsics (Red Hat)
– JEP 331: Low overhead heap profiling (Google)
29
© Copyright Azul Systems 2018
JDK 11: JEPs
 JEP 309: Dynamic Class-file constants
– Like invokedynamic but for class-file constants
– Bootstrap method used at runtime, not compile time
– Useful for compiler and language developers
 JEP 328: Flight Recorder
– Final piece of aligning OpenJDK and Oracle JDK
30
© Copyright Azul Systems 2018
JDK 11: JEPs
 JEP 320: Remove CORBA and Java EE modules
– The power of a module system
 JEP 321: HTTP client
– HTTP/2 support
– Incubating module from JDK 9 standardised
 JEP 323: Local variable syntax for Lambda parameters
– Extending JEP 286 in JDK 10
– (var x, var y) -> x.process(y)
31
© Copyright Azul Systems 2018
JDK 11: JEPs
 JEP 324: Key Agreement with Curve25519 and Curve448
– More efficient and secure than existing ECDH
 JEP 327: Unicode 10
– 8,518 new characters (seriously)
– Bitcoin symbol, Nishu, Soyombo, Zanabazar Square
– Long awaited (?) Colbert emoji
32
© Copyright Azul Systems 2018
JDK 11: New APIs
 New methods but no new classes
– InputStream nullInputStream()
– Writer nullWriter()
– Path of(String, String ...)
33
© Copyright Azul Systems 2018
Longer Term JDK Futures
© Copyright Azul Systems 2018
OpenJDK Projects
 Amber
– Simplifying syntax
 Valhalla
– Value types and specialised generics
 Loom
– Continuations and fibres
 Metropolis
– The JVM re-written in Java
 Panama
– FFI replacement for JNI
35
© Copyright Azul Systems 2018
Project Amber
 JEP 286: Local variable type inference
– Delivered in JDK 10
 JEP 323: Local variable syntax for Lambdas
– Will be delivered in JDK 11
36
© Copyright Azul Systems 2018
Project Amber
 JEP 302: Lambda leftovers
– Single underscore for unused parameters
 JEP 326: Raw string literals (JDK 12)
– Use single backquote
– `c:Userssimon`
– ```A string with a `` in it```
37
© Copyright Azul Systems 2018
JEP 305: Pattern Matching
 Type test and switch statement support to start
38
String formatted;
switch (obj) {
case Integer i: formatted = String.format("int %d", i); break;
case Byte b: formatted = String.format("byte %d", b); break;
case Long l: formatted = String.format("long %d", l); break;
case Double d: formatted = String.format("double %f", d);
break;
case String s: formatted = String.format("String %s", s); break
default: formatted = obj.toString();
}
© Copyright Azul Systems 2018
JEP 325: Switch Expressions (JDK 12)
39
int numLetters;
switch (day) {
case MONDAY:
case FRIDAY:
case SUNDAY:
numLetters = 6;
break;
case TUESDAY:
numLetters = 7;
break;
case THURSDAY:
case SATURDAY:
numLetters = 8;
break;
case WEDNESDAY:
numLetters = 9;
break;
default:
throw new IllegalStateException("Huh?: " + day); };
© Copyright Azul Systems 2018
JEP 325: Switch Expressions
int numLetters = switch (day) {
case MONDAY, FRIDAY, SUNDAY -> 6;
case TUESDAY -> 7;
case THURSDAY, SATURDAY -> 8;
case WEDNESDAY -> 9;
default -> throw new IllegalStateException("Huh?: " + day);
};
© Copyright Azul Systems 2018
Project Valhalla
 Java has:
– Primitives: for performance
– Objects: for encapsulation, polymorphism, inheritance, OO
 Problem is where we want to use primitives but can't
– ArrayList<int> won't work
– ArrayList<Integer> requires boxing and unboxing,
object creation, heap overhead, indirection reference
41
© Copyright Azul Systems 2018
Project Valhalla
 Value types
 "Codes like a class, works like a primitive"
– Can have methods and fields
– Can implement interfaces
– Can use encapsulation
– Can be generic
– Can't be mutated
– Can't be sub-classed
42
© Copyright Azul Systems 2018
Project Loom
 Further work on making concurrent programming simpler
– Threads are too heavyweight
 Loom will introduce fibres
– JVM level threads (remember green threads?)
– Add continuations to the JVM
– Use the ForkJoinPool scheduler
– Much lighter weight than threads
 Less memory
 Close to zero overhead for task switching
43
© Copyright Azul Systems 2018
Project Metropolis
 Run Java on Java
– Rewrite most of the JVM in Java
 Use the Graal compiler project as significant input
 Easier ports to new platforms
– Less native code to modify and compile
 Faster new features on front-end
– Easier to write Java than C++
 Performance is an issue to be explored and resolved
– AOT compiler in JDK 9 is the start of this
44
© Copyright Azul Systems 2018
Azul's Zulu Java
© Copyright Azul Systems 2018
Zulu Java
 Azul’s free binary distribution of OpenJDK
– Passes all TCK tests
 JDK 6, 7, 8, 9,10 and 11 (EA) available
 Wider platform support:
– Intel 64-bit Windows, Mac, Linux
– Intel 32-bit Windows and Linux
– ARM 32 and 64-bit
– PowerPC
46
www.azul.com/downloads/zulu
© Copyright Azul Systems 2018
Summary
© Copyright Azul Systems 2018
Java Continues To Evolve
 Faster Java releases
– Feature release every 6 months
– Access to free updates is a consideration
 Lots of ideas to improve Java
– Value types, fibres, syntax improvements
 Zulu Java has wide platform and JDK version support
– Very reasonable cost for commercial support
48
© Copyright Azul Systems 2018
© Copyright Azul Systems 2015
@speakjava
Thank You!
Simon Ritter
Deputy CTO, Azul Systems
49

More Related Content

PPTX
JDK 9 Deep Dive
PPTX
JDK 9, 10, 11 and Beyond
PPTX
JDK 9 and JDK 10 Deep Dive
PPTX
Moving Towards JDK 12
PPTX
Java Support: What's changing
PPTX
JDK 9: The Start of a New Future for Java
PPTX
JDK 9: Mission Accomplished. What Next For Java?
PPTX
JDK 9: Big Changes To Make Java Smaller
JDK 9 Deep Dive
JDK 9, 10, 11 and Beyond
JDK 9 and JDK 10 Deep Dive
Moving Towards JDK 12
Java Support: What's changing
JDK 9: The Start of a New Future for Java
JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Big Changes To Make Java Smaller

What's hot (20)

PPTX
Java Is Still Free
PPTX
JDK 9: Migrating Applications
PPTX
Is An Agile Standard Possible For Java?
PPTX
JDK 9: Big Changes To Make Java Smaller
PPTX
What's New in Java 9
PPTX
55 New Features in JDK 9
PDF
Java 12 - New features in action
PPTX
The latest features coming to Java 12
PDF
JDK-9: Modules and Java Linker
PPTX
JDK 14 Lots of New Features
PPTX
Java 9 Modularity and Project Jigsaw
PDF
Oracle Keynote from JMagghreb 2014
PPTX
Modularization With Project Jigsaw in JDK 9
PDF
Java: Create The Future Keynote
PDF
Java 9 preview
PDF
Java 10 New Features
PDF
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
PDF
JDK 9 Java Platform Module System
PPTX
Project Jigsaw in JDK9
PDF
Preparing your code for Java 9
Java Is Still Free
JDK 9: Migrating Applications
Is An Agile Standard Possible For Java?
JDK 9: Big Changes To Make Java Smaller
What's New in Java 9
55 New Features in JDK 9
Java 12 - New features in action
The latest features coming to Java 12
JDK-9: Modules and Java Linker
JDK 14 Lots of New Features
Java 9 Modularity and Project Jigsaw
Oracle Keynote from JMagghreb 2014
Modularization With Project Jigsaw in JDK 9
Java: Create The Future Keynote
Java 9 preview
Java 10 New Features
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
JDK 9 Java Platform Module System
Project Jigsaw in JDK9
Preparing your code for Java 9
Ad

Similar to JDK 9, 10, 11 and Beyond (20)

PPTX
Is Java Still Free?
PPTX
How to Choose a JDK
PPTX
55 New Features in JDK 9
PPTX
JDK 9: 55 New Features
PPTX
Keeping Up with Java: Look at All These New Features!
PDF
Whats new in Java 9,10,11,12
PDF
Haj 4344-java se 9 and the application server-1
PDF
A Journey through the JDKs (Java 9 to Java 11)
PDF
Project Jigsaw in JDK 9: Modularity Comes To Java
PDF
Above and Beyond JDK 9, 10, 11, 12... - Branko Mihaljević and Martin Žagar on...
PDF
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
PDF
Javantura v6 - Java SE, Today and Tomorrow - Dalibor Topic
PDF
Java10 and Java11 at JJUG CCC 2018 Spr
PDF
JavaFest. Денис Макогон. 6 заблуждений относительно современной Java
PDF
Java 9-10 What's New
PPTX
Migrating to Java 11
PDF
Jozi-JUG JDK 9 Unconference
PPTX
Discuss about java 9 with latest features
PPTX
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
Is Java Still Free?
How to Choose a JDK
55 New Features in JDK 9
JDK 9: 55 New Features
Keeping Up with Java: Look at All These New Features!
Whats new in Java 9,10,11,12
Haj 4344-java se 9 and the application server-1
A Journey through the JDKs (Java 9 to Java 11)
Project Jigsaw in JDK 9: Modularity Comes To Java
Above and Beyond JDK 9, 10, 11, 12... - Branko Mihaljević and Martin Žagar on...
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
Javantura v6 - Java SE, Today and Tomorrow - Dalibor Topic
Java10 and Java11 at JJUG CCC 2018 Spr
JavaFest. Денис Макогон. 6 заблуждений относительно современной Java
Java 9-10 What's New
Migrating to Java 11
Jozi-JUG JDK 9 Unconference
Discuss about java 9 with latest features
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
Ad

More from Simon Ritter (17)

PPTX
Java Pattern Puzzles Java Pattern Puzzles
PPTX
Keeping Your Java Hot by Solving the JVM Warmup Problem
PPTX
Cloud Native Compiler
PPTX
Java On CRaC
PPTX
The Art of Java Type Patterns
PPTX
Modern Java Workshop
PPTX
Java performance monitoring
PPTX
Modern Java Workshop
PPTX
Getting the Most From Modern Java
PPTX
Building a Better JVM
PPTX
Java after 8
PPTX
Java Programming
PPTX
The Latest in Enterprise JavaBeans Technology
PPTX
Developing Enterprise Applications Using Java Technology
PPTX
Building a Brain with Raspberry Pi and Zulu Embedded JVM
PPTX
It's Java, Jim, but not as we know it
PPTX
Whats New For Developers In JDK 9
Java Pattern Puzzles Java Pattern Puzzles
Keeping Your Java Hot by Solving the JVM Warmup Problem
Cloud Native Compiler
Java On CRaC
The Art of Java Type Patterns
Modern Java Workshop
Java performance monitoring
Modern Java Workshop
Getting the Most From Modern Java
Building a Better JVM
Java after 8
Java Programming
The Latest in Enterprise JavaBeans Technology
Developing Enterprise Applications Using Java Technology
Building a Brain with Raspberry Pi and Zulu Embedded JVM
It's Java, Jim, but not as we know it
Whats New For Developers In JDK 9

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
top salesforce developer skills in 2025.pdf
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Transform Your Business with a Software ERP System
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Digital Strategies for Manufacturing Companies
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
CHAPTER 2 - PM Management and IT Context
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Reimagine Home Health with the Power of Agentic AI​
Which alternative to Crystal Reports is best for small or large businesses.pdf
top salesforce developer skills in 2025.pdf
L1 - Introduction to python Backend.pptx
Transform Your Business with a Software ERP System
How to Migrate SBCGlobal Email to Yahoo Easily
2025 Textile ERP Trends: SAP, Odoo & Oracle
Odoo POS Development Services by CandidRoot Solutions
Softaken Excel to vCard Converter Software.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How Creative Agencies Leverage Project Management Software.pdf
Understanding Forklifts - TECH EHS Solution
Digital Strategies for Manufacturing Companies
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Lecture 3: Operating Systems Introduction to Computer Hardware Systems

JDK 9, 10, 11 and Beyond

  • 1. © Copyright Azul Systems 2018 © Copyright Azul Systems 2015 @speakjava JDK 9, 10, 11 and Beyond: Delivering New Features in the JDK Simon Ritter Deputy CTO, Azul Systems 1
  • 2. © Copyright Azul Systems 2018 JDK 9: Big And Small Changes 2
  • 3. © Copyright Azul Systems 2018 Java Platform Module System (JPMS)  The core Java libraries are now a set of modules (JEP 220) – 75 OpenJDK modules: 27 Java SE, 48 JDK – Oracle JDK: 14 additional JDK, 8 JavaFX, 2 Oracle specific  Most internal APIs now encapsulated (JEP 260) – sun.misc.Unsafe – Some can be used with command line options 3
  • 4. © Copyright Azul Systems 2018 jlink: The Java Linker (JEP 282) 4 Modular run-time image …confbin jlink $ jlink --modulepath $JDKMODS --addmods java.base –output myimage $ myimage/bin/java –-list-modules java.base@9 lib
  • 5. © Copyright Azul Systems 2018 jlink: The Java Linker (JEP 282) $ jlink --module-path $JDKMODS:$MYMODS --addmods com.azul.zapp –-output myimage $ myimage/bin/java –-list-modules java.base@9 java.logging@9 java.sql@9 java.xml@9 com.azul.zapp@1.0 com.azul.zoop@1.0 com.azul.zeta@1.0
  • 6. © Copyright Azul Systems 2018 Moving Java Forward Faster
  • 7. © Copyright Azul Systems 2018 Java Platform Development  Development of releases takes time – JDK 6: 2 years and 2 months after JDK 5 – JDK 7: 4 years and 8 months after JDK 6 – JDK 8: 2 years and 8 months after JDK 7 – JDK 9: 3 years and 6 months after JDK 8 7
  • 8. © Copyright Azul Systems 2018 Migrating To A New Version  Plenty of time to continue with previous release – JDK 6: 2 years and 11 months of public JDK 5 updates – JDK 7: 1 year and 9 months of public JDK 6 updates – JDK 8: 1 year and 1 month of public JDK 7 updates  Also allows for stabilisation of new platform before migrating applications in production 8
  • 9. © Copyright Azul Systems 2018 The Java Platform Today 9 Stable Secure Free
  • 10. © Copyright Azul Systems 2018 OpenJDK: New Release Model  A new version of the JDK will be released every six months – March and September – Started this year with JDK 10 and JDK 11  OpenJDK development will be more agile – Previous target was a release every two years  Features will be included only when ready – Targeted for a release when feature complete 10
  • 11. © Copyright Azul Systems 2018 Long Term Support Releases  Long term support for all releases is not practical – One Long Term Support (LTS) release every three years  JDK 8 has been classified as an LTS release  JDK 8 public updates stop in January 2019 for commercial users  Non-commercial users get updates until December 2020  Next LTS release is JDK 11  JDK 9 and JDK 10 are feature releases  Updates for only six months 11
  • 12. © Copyright Azul Systems 2018 Which JDK Binary  Traditional Oracle branded binary (java.oracle.com) – Oracle Binary Code License (FoU restrictions)  New OpenJDK binary (jdk.java.net) – GPLv2 with CPE license (no restrictions) – Security and bug fix updates only for six months  Only until next JDK release  Two scheduled updates – No overlap of updates for previous version 12
  • 13. © Copyright Azul Systems 2018 Converged Binaries Oracle JDK OpenJDK Java SE JDK 10 and earlier Java SE OpenJDK & Oracle JDK JDK 11 and later
  • 14. © Copyright Azul Systems 2018 Converged Binaries (JDK 11)  Some closed-source parts of the JDK will be open-sourced – Flight recorder – Mission control ✔ – Others ✔  Other closed-source parts will be removed – Browser Plugin – Java Web Start – JavaFX 14
  • 15. © Copyright Azul Systems 2018 JDK 9 Onwards And Compatibility 15 "Clean applications that just depend on java.se should just work" - Oracle
  • 16. © Copyright Azul Systems 2018 JDK 9: The Clean Up Starts  JDK 9 was a significant change for Java – Deprecated APIs were removed for the first time  Six methods and one class  JDK 10 removed 1 package, 6 classes, 9 methods and 1 field – Redundant features eliminated  jhat tool, JVM TI hprof agent  Numerous deprecated GC options removed – Significant command line changes  JDK 9 removed 187 -XX flags  JDK 10 removed 36 -XX flags 16
  • 17. © Copyright Azul Systems 2018 Housekeeping Will Continue  More significant removals in JDK 11 – Applets, Browser Plugin, Web Start, JavaFX – java.se.ee meta-module  java.corba  java.transaction  java.activation  java.xml.bind  java.xml.ws  java.xml.ws.annotation  More in the future – Nashorn deprecated, CMS garbage collector? 17
  • 18. © Copyright Azul Systems 2018 Compatibility Not Guaranteed  New versions of Java may include breaking changes – Anything for removal will be deprecated first – Minimum of one release warning  Could be only six months 18
  • 19. © Copyright Azul Systems 2018 Eliminating Confusion  There will be an LTS release every three years – This does NOT mean 3 years of free updates  Oracle JDK (from JDK 11) can ONLY be used in production with a commercial support contract – The only free JDK 11 and later will be OpenJDK binaries  To continue to receive free updates to the JDK you MUST update your JDK EVERY SIX MONTHS  JDK 8 can be used indefinitely for free – But without any further security patches and bug fixes 19
  • 20. © Copyright Azul Systems 2018 New JDK Update Schedule
  • 21. © Copyright Azul Systems 2018 The Java Platform Soon 21 Stable Secure Free Choose two out of three
  • 22. © Copyright Azul Systems 2018 JDK 10
  • 23. © Copyright Azul Systems 2018 Local Variable Type Inference  JEP 286 – Simple use cases – Style guidelines available – Good (appropriate use of variable name) – Poor  Infered type is PriorityQueue<Object> 23 var list = new ArrayList<String>(); // infers ArrayList<String> var stream = list.stream(); // infers Stream<String> var stringList = List.of("a", "b", "c"); var itemQueue = new PriorityQueue<>();
  • 24. © Copyright Azul Systems 2018 JDK 10: JEPs  JEP 307: Parallel Full GC for G1 – Still a full GC with potentially big pauses  JEP 310: Application Class-Data Sharing – Previous commercial Oracle feature  JEP 317: Experimental Java-based JIT compiler (Graal)  JEP 319: Root Certificates – default set of root CA certificates  JEP 296: Consolidate JDK forests into single repo – Eight repos becomes one 24
  • 25. © Copyright Azul Systems 2018 JDK 10: JEPs  JEP 316: Heap allocation on alternative devices (Intel) – NV-RAM with same semantics as DRAM  JEP 313: Remove javah tool – Same functionality through javac  JEP 304: Garbage Collector Interface (Red Hat) – Easier to add new algorithms (JVM internal)  JEP 312: Thread-Local Handshakes – Execute callbacks on threads without performing a global VM safepoint 25
  • 26. © Copyright Azul Systems 2018 JDK 10: APIs  73 New APIs – List, Set, Map.copyOf(Collection) – Collectors  toUnmodifiableList  toUnmodifiableMap  toUnmodifiableSet – Optional.orElseThrow() 26
  • 27. © Copyright Azul Systems 2018 JDK 10: Miscellaneous  XMLInputFactory.newFactory() de-deprecated (precated?)  com.sun.security.auth package – Six deprecated classes removed  java.lang.SecurityManager – One deprecated field and seven methods removed  JVM now more Docker container aware – Uses container CPU count and memory size – Namespace issues resolved (pids) 27
  • 28. © Copyright Azul Systems 2018 JDK 11
  • 29. © Copyright Azul Systems 2018 JDK 11  17 JEPs  3 from outside Oracle – JEP 318: Epsilon garbage collector (Red Hat) – JEP 315: Improve Aarch64 intrinsics (Red Hat) – JEP 331: Low overhead heap profiling (Google) 29
  • 30. © Copyright Azul Systems 2018 JDK 11: JEPs  JEP 309: Dynamic Class-file constants – Like invokedynamic but for class-file constants – Bootstrap method used at runtime, not compile time – Useful for compiler and language developers  JEP 328: Flight Recorder – Final piece of aligning OpenJDK and Oracle JDK 30
  • 31. © Copyright Azul Systems 2018 JDK 11: JEPs  JEP 320: Remove CORBA and Java EE modules – The power of a module system  JEP 321: HTTP client – HTTP/2 support – Incubating module from JDK 9 standardised  JEP 323: Local variable syntax for Lambda parameters – Extending JEP 286 in JDK 10 – (var x, var y) -> x.process(y) 31
  • 32. © Copyright Azul Systems 2018 JDK 11: JEPs  JEP 324: Key Agreement with Curve25519 and Curve448 – More efficient and secure than existing ECDH  JEP 327: Unicode 10 – 8,518 new characters (seriously) – Bitcoin symbol, Nishu, Soyombo, Zanabazar Square – Long awaited (?) Colbert emoji 32
  • 33. © Copyright Azul Systems 2018 JDK 11: New APIs  New methods but no new classes – InputStream nullInputStream() – Writer nullWriter() – Path of(String, String ...) 33
  • 34. © Copyright Azul Systems 2018 Longer Term JDK Futures
  • 35. © Copyright Azul Systems 2018 OpenJDK Projects  Amber – Simplifying syntax  Valhalla – Value types and specialised generics  Loom – Continuations and fibres  Metropolis – The JVM re-written in Java  Panama – FFI replacement for JNI 35
  • 36. © Copyright Azul Systems 2018 Project Amber  JEP 286: Local variable type inference – Delivered in JDK 10  JEP 323: Local variable syntax for Lambdas – Will be delivered in JDK 11 36
  • 37. © Copyright Azul Systems 2018 Project Amber  JEP 302: Lambda leftovers – Single underscore for unused parameters  JEP 326: Raw string literals (JDK 12) – Use single backquote – `c:Userssimon` – ```A string with a `` in it``` 37
  • 38. © Copyright Azul Systems 2018 JEP 305: Pattern Matching  Type test and switch statement support to start 38 String formatted; switch (obj) { case Integer i: formatted = String.format("int %d", i); break; case Byte b: formatted = String.format("byte %d", b); break; case Long l: formatted = String.format("long %d", l); break; case Double d: formatted = String.format("double %f", d); break; case String s: formatted = String.format("String %s", s); break default: formatted = obj.toString(); }
  • 39. © Copyright Azul Systems 2018 JEP 325: Switch Expressions (JDK 12) 39 int numLetters; switch (day) { case MONDAY: case FRIDAY: case SUNDAY: numLetters = 6; break; case TUESDAY: numLetters = 7; break; case THURSDAY: case SATURDAY: numLetters = 8; break; case WEDNESDAY: numLetters = 9; break; default: throw new IllegalStateException("Huh?: " + day); };
  • 40. © Copyright Azul Systems 2018 JEP 325: Switch Expressions int numLetters = switch (day) { case MONDAY, FRIDAY, SUNDAY -> 6; case TUESDAY -> 7; case THURSDAY, SATURDAY -> 8; case WEDNESDAY -> 9; default -> throw new IllegalStateException("Huh?: " + day); };
  • 41. © Copyright Azul Systems 2018 Project Valhalla  Java has: – Primitives: for performance – Objects: for encapsulation, polymorphism, inheritance, OO  Problem is where we want to use primitives but can't – ArrayList<int> won't work – ArrayList<Integer> requires boxing and unboxing, object creation, heap overhead, indirection reference 41
  • 42. © Copyright Azul Systems 2018 Project Valhalla  Value types  "Codes like a class, works like a primitive" – Can have methods and fields – Can implement interfaces – Can use encapsulation – Can be generic – Can't be mutated – Can't be sub-classed 42
  • 43. © Copyright Azul Systems 2018 Project Loom  Further work on making concurrent programming simpler – Threads are too heavyweight  Loom will introduce fibres – JVM level threads (remember green threads?) – Add continuations to the JVM – Use the ForkJoinPool scheduler – Much lighter weight than threads  Less memory  Close to zero overhead for task switching 43
  • 44. © Copyright Azul Systems 2018 Project Metropolis  Run Java on Java – Rewrite most of the JVM in Java  Use the Graal compiler project as significant input  Easier ports to new platforms – Less native code to modify and compile  Faster new features on front-end – Easier to write Java than C++  Performance is an issue to be explored and resolved – AOT compiler in JDK 9 is the start of this 44
  • 45. © Copyright Azul Systems 2018 Azul's Zulu Java
  • 46. © Copyright Azul Systems 2018 Zulu Java  Azul’s free binary distribution of OpenJDK – Passes all TCK tests  JDK 6, 7, 8, 9,10 and 11 (EA) available  Wider platform support: – Intel 64-bit Windows, Mac, Linux – Intel 32-bit Windows and Linux – ARM 32 and 64-bit – PowerPC 46 www.azul.com/downloads/zulu
  • 47. © Copyright Azul Systems 2018 Summary
  • 48. © Copyright Azul Systems 2018 Java Continues To Evolve  Faster Java releases – Feature release every 6 months – Access to free updates is a consideration  Lots of ideas to improve Java – Value types, fibres, syntax improvements  Zulu Java has wide platform and JDK version support – Very reasonable cost for commercial support 48
  • 49. © Copyright Azul Systems 2018 © Copyright Azul Systems 2015 @speakjava Thank You! Simon Ritter Deputy CTO, Azul Systems 49

Editor's Notes

  • #13: FoU = Field of Use. restriction prevented people using Java in embedded applications without buying a license. CPE = Classpath Exception. Eliminates the problem of the GPL license being viral, which would require you to make the source code for your application available.
  • #15: Late 2018 probably means JDK 11, which comes out in September. The idea of eliminating differences is so that the two binaries from Oracle (reference last slide) will be functionaly the same.
  • #21: This diagram clearly shows that as of JDK 11 all Oracle biaries will no longer be usable in production withourt a support contract (make this distinction, Oracle PM have said that you'll still be able to download Oracle binaries, you just won't be able to use them in production). JDK 8 support has been extended to Jan 2019. After that updates will only be for non-commercial users (i.e. individual desktop users).
  • #39: JEP 312: Global safepoint