SlideShare a Scribd company logo
© Copyright Azul Systems 2019
© Copyright Azul Systems 2015
@speakjava
Moving Towards JDK 12:
Delivering New Java Features
Simon Ritter
Deputy CTO, Azul Systems
1
© Copyright Azul Systems 2019
JDK 9: Big And Small Changes
2
© Copyright Azul Systems 2019
Java Platform Module System (JPMS)
 The core Java libraries are now a set of modules (JEP 220)
– 75 OpenJDK modules: 26 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 2019
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
myimage
…confbin
jlink
lib
© Copyright Azul Systems 2019
Moving Java Forward Faster
© Copyright Azul Systems 2019
OpenJDK: New Release Model
 A new version of the JDK will be released every six months
– March and September
– Started last year with JDK 10 and JDK 11
– Continuing this year with JDK 12 and JDK 13
 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
6
© Copyright Azul Systems 2019
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
 Last JDK 8 public update last week for commercial users!
 Non-commercial users get updates until December 2020
 JDK 11 is an LTS release
 JDK 9 and JDK 10 are feature releases
 Updated only until next release
7
© Copyright Azul Systems 2019
Oracle 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
8
© Copyright Azul Systems 2019
Converged Binaries
Oracle JDK
OpenJDK
Java SE
JDK 10 and earlier
Java SE
OpenJDK
& Oracle JDK
JDK 11 and later
© Copyright Azul Systems 2019
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
10
© Copyright Azul Systems 2019
JDK 9 Onwards And Compatibility
11
"Clean applications that just depend on java.se
should just work" - Oracle
© Copyright Azul Systems 2019
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
 JDK 10 and 11 have continued this work
 More features will be removed in the future
 CMS GC, Nashorn and Pack200 all deprecated. Others?
12
© Copyright Azul Systems 2019
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
13
© Copyright Azul Systems 2019
Java Updates
 Oracle JDK binary has LTS versions (JDK 11, 17, etc.)
– Oracle OpenJDK does not
 Oracle JDK 11 was released under a different license
– Free for development and testing
– Requires a Java SE subscription for use in production
 Oracle OpenJDK binaries only updated for six months
 JDK 8 can be used indefinitely for free
– But without any further security patches and bug fixes
14
© Copyright Azul Systems 2019
JDK 10
© Copyright Azul Systems 2019
Local Variable Type Inference (JEP 286)
 Java gets var
16
var userList = new ArrayList<String>(); // infers ArrayList<String>
var stream = list.stream(); // infers Stream<String>
for (var name : userList) { // infers String
...
}
for (var i; i < 10; i++) { // infers int
...
}
© Copyright Azul Systems 2019
var: Clearer try-with-resources
17
try (InputStream inputStream = socket.getInputStream();
InputStreamReader inputStreamReader =
new inputStreamReader(is, UTF_8);
BufferedReader bufferedReader = new BufferedReader(isr)) {
// Use bufferedReader
}
© Copyright Azul Systems 2019
var: Clearer try-with-resources
18
try (var inputStream = socket.getInputStream();
var inputStreamReader = new inputStreamReader(is, UTF_8);
var bufferedReader = new BufferedReader(isr)) {
// Use bufferedReader
}
© Copyright Azul Systems 2019
var: Reserved Type (Not Keyword)
var var = new ValueAddedReseller();
public class var {
public var(String x) {
...
}
}
public class Var {
public Var(String x) {
...
}
}
© Copyright Azul Systems 2019
JDK 10: JEPs
 JEP 307: Parallel Full GC for G1
 JEP 310: Application Class-Data Sharing
 JEP 317: Experimental Java-based JIT compiler (Graal)
 JEP 319: Root Certificates
 JEP 296: Consolidate JDK forests into single repo
20
© Copyright Azul Systems 2019
JDK 10: JEPs
 JEP 316: Heap allocation on alternative devices (Intel)
 JEP 313: Remove javah tool
 JEP 304: Garbage Collector Interface (Red Hat)
 JEP 312: Thread-Local Handshakes
21
© Copyright Azul Systems 2019
JDK 10: APIs
 73 New APIs
– List, Set, Map.copyOf(Collection)
– Collectors
 toUnmodifiableList
 toUnmodifiableMap
 toUnmodifiableSet
– Optional.orElseThrow()
22
© Copyright Azul Systems 2019
JDK 11
© Copyright Azul Systems 2019
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)
24
© Copyright Azul Systems 2019
323: Extend Local-Variable Syntax
 Local-variable syntax for lambda parameters
25
list.stream()
.map(s -> s.toLowerCase())
.collect(Collectors.toList());
list.stream()
.map((var s) -> s.toLowerCase())
.collect(Collectors.toList());
list.stream()
.map((@Notnull var s) -> s.toLowerCase())
.collect(Collectors.toList());
© Copyright Azul Systems 2019
327: Unicode 10 Support
 8,518 new characters (seriously)
– Bitcoin symbol
– Nishu
– Soyombo, Zanabazar Square
 The long awaited (?) Colbert emoji
26
© Copyright Azul Systems 2019
330: Launch Single File Source Code
 JDK 10 has three modes for the Java launcher
– Launch a class file
– Launch the main class of a JAR file
– Launch the main class of a module
 JDK 11 adds a forth
– Launch a class declared in a source file
27
$ java Factorial.java 4
© Copyright Azul Systems 2019
Single File Source Code Shebang
28
#!$JAVA_HOME/bin/java --source 11
public class Factorial {
public static void main(String[] args) {
int n = Integer.parseInt(args[0]);
int r = (n == 0) ? 0 : 1;
for (int i = 1; i <= n; i++)
r *= i;
System.out.println("n = " + n + ", n! = " + r);
}
}
$ ./Factorial 4
n = 4, n! = 24
© Copyright Azul Systems 2019
Other JDK 11 JEPs
 181: Nest-based Access Control
 309: Dynamic Class-file constants
 321: HTTP client
 324: Key Agreement with Curve25519 and Curve448
 329: ChaCha20 and Poly1305 Cryptographic Algorithms
 332: Transport Layer Security (TLS) 1.3
 333: ZGC: Experimental low-latency collector
 335: Deprecate the Nashorn JavaScript Engine
 336: Deprecate the Pack200 Tools and API
29
© Copyright Azul Systems 2019
New APIs
 New I/O methods
 InputStream nullInputStream()
 OutputStream nullOutputStream()
 Reader nullReader()
 Writer nullWriter()
 Optional
 isEmpty() // Opposite of isPresent
 Character
 toString(int) // Unicode codepoint
30
© Copyright Azul Systems 2019
New APIs
 New String methods
– isBlank()
– Stream lines()
– String repeat(int)
– String strip()
– String stripLeading()
– String stripTrailing()
31
© Copyright Azul Systems 2019
New APIs
 Predicate not(Predicate)
32
lines.stream()
.filter(s -> !s.isBlank())
lines.stream()
.filter(Predicate.not(String::isBlank))
lines.stream()
.filter(not(String::isBlank))
© Copyright Azul Systems 2019
JDK 11: Modules Removed
– The java.se.ee aggregator-module has been removed
 java.corba
 java.transaction
 java.activation
 java.xml.bind
 java.xml.ws
 java.xml.ws.annotation
33
© Copyright Azul Systems 2019
Command Line -XX Flags
 Big changes
 JDK 9
– Removed 187, added 123
 JDK 10
– Removed 36, added 26
 JDK 11
– Removed 27, added 53
34
chriswhocodes.com/hotspot_option_differences.html
© Copyright Azul Systems 2019
What Will Be in JDK 12?
© Copyright Azul Systems 2019
JEP 325: Switch Expressions (Preview)
36
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 2019
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 2019
JEPs
 189: Shenandoah GC (Experimental)
 G1 GC updates
– 344: Abortable mixed collections
– 346: Return unused committed memory
 334: JVM constant API
 230: Microbenchmark suite
 341: Default CDS archive
© Copyright Azul Systems 2019
New APIs
 Collectors
– teeing(Collector, Collector, BiFunction)
 Class
– describeConstable
 CompletableFuture/CompletionStage
– Five new methods for exceptions in CompletionStage
39
© Copyright Azul Systems 2019
Longer Term JDK Futures
© Copyright Azul Systems 2019
Project Amber
 Simplifying Java language syntax
 JEP 302: Lambda leftovers
– Single underscore for unused parameters
 JEP 326: Raw string literals
– Use single backquote
– `c:Userssimon`
– ```A string with a `` in it```
41
© Copyright Azul Systems 2019
JEP 305: Pattern Matching
 Type test and switch statement support to start
42
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 2019
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
43
© Copyright Azul Systems 2019
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
44
© Copyright Azul Systems 2019
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
45
© Copyright Azul Systems 2019
Azul's Zulu Java
© Copyright Azul Systems 2019
Zulu Java
 Azul’s binary distribution of OpenJDK
– Passes all TCK tests
 JDK 6, 7, 8, 9, 10 and 11 available
 Wide platform support:
– Intel 64-bit Windows, Mac, Linux
– Intel 32-bit Windows and Linux
– ARM 32 and 64-bit
– PowerPC
47
www.azul.com/downloads/zulu
© Copyright Azul Systems 2019
Zulu Extended Support
 Backporting of bug fixes and security patches from
supported OpenJDK release
 Zulu 8 supported until March 2026
 LTS releases have 9 years active + 2 years passive support
 Medium Term Support releases
– Two interim releases between LTS releases (9, 13, 15...)
– Bridge to LTS releases
– Supported until 18 months after next LTS release
48
© Copyright Azul Systems 2019
Zulu Complete Support
 24x7x365 or 8x5 telephone and e-mail contact
– Report JDK-related problems
 Follow-the-sun engineering team
– Highly experienced engineers
– Many ex-Sun and ex-Oracle Java team
 Root-cause and fix problems
– Generate custom JDK binaries for fixes
– Upstream fixes to OpenJDK where possible
49
© Copyright Azul Systems 2019
Azul Zulu Extended (Passive)
Commercial Support
2020 2021
8(LTS)
19
18
17(LTS)
16
15
14
13
12
11(LTS)
10
9
7(LTS)
2017 2018
Oracle Publicly available binaries
(unsupported)
14
13
12
11(LTS)
10
9
8(LTS)
7(LTS)
Oracle Commercial
Support
Oracle Extended
Commercial Support
Azul Zulu
Community Builds
20222019
Azul Zulu Production
Commercial Support
2023 2024
19
18
17(LTS)
16
15
Azul Zulu MTS
Support
Bridge to next LTS
Azul Zulu LTS Support
8 years active
JavaSEVersionJava SE Lifecycle: 5+ Years
© Copyright Azul Systems 2019
Summary
© Copyright Azul Systems 2019
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
52
© Copyright Azul Systems 2019
© Copyright Azul Systems 2015
@speakjava
Thank You!
Simon Ritter
Deputy CTO, Azul Systems
53

More Related Content

What's hot

Java Is Still Free
Java Is Still FreeJava Is Still Free
Java Is Still Free
Simon Ritter
 
JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?
Simon Ritter
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
Simon Ritter
 
JDK 9: Migrating Applications
JDK 9: Migrating ApplicationsJDK 9: Migrating Applications
JDK 9: Migrating Applications
Simon Ritter
 
What's New in Java 9
What's New in Java 9What's New in Java 9
What's New in Java 9
Richard Langlois P. Eng.
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
Simon Ritter
 
JDK 14 Lots of New Features
JDK 14 Lots of New FeaturesJDK 14 Lots of New Features
JDK 14 Lots of New Features
Simon Ritter
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
Simon Ritter
 
Java: Create The Future Keynote
Java: Create The Future KeynoteJava: Create The Future Keynote
Java: Create The Future Keynote
Simon Ritter
 
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014
Simon Ritter
 
Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9
Simon Ritter
 
How to Choose a JDK
How to Choose a JDKHow to Choose a JDK
How to Choose a JDK
Simon Ritter
 
JDK 9 Java Platform Module System
JDK 9 Java Platform Module SystemJDK 9 Java Platform Module System
JDK 9 Java Platform Module System
Wolfgang Weigend
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
Simon Ritter
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
Wolfgang Weigend
 
Java 8 Features
Java 8 FeaturesJava 8 Features
Java 8 Features
Trung Nguyen
 
Project Jigsaw in JDK9
Project Jigsaw in JDK9Project Jigsaw in JDK9
Project Jigsaw in JDK9
Simon Ritter
 
New PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cNew PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12c
Connor McDonald
 
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDKComparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Firmansyah, SCJP, OCEWCD, OCEWSD, TOGAF, OCMJEA, CEH
 
Microservices and Container
Microservices and ContainerMicroservices and Container
Microservices and Container
Wolfgang Weigend
 

What's hot (20)

Java Is Still Free
Java Is Still FreeJava Is Still Free
Java Is Still Free
 
JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
 
JDK 9: Migrating Applications
JDK 9: Migrating ApplicationsJDK 9: Migrating Applications
JDK 9: Migrating Applications
 
What's New in Java 9
What's New in Java 9What's New in Java 9
What's New in Java 9
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
 
JDK 14 Lots of New Features
JDK 14 Lots of New FeaturesJDK 14 Lots of New Features
JDK 14 Lots of New Features
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 
Java: Create The Future Keynote
Java: Create The Future KeynoteJava: Create The Future Keynote
Java: Create The Future Keynote
 
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014
 
Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9Modularization With Project Jigsaw in JDK 9
Modularization With Project Jigsaw in JDK 9
 
How to Choose a JDK
How to Choose a JDKHow to Choose a JDK
How to Choose a JDK
 
JDK 9 Java Platform Module System
JDK 9 Java Platform Module SystemJDK 9 Java Platform Module System
JDK 9 Java Platform Module System
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Java 8 Features
Java 8 FeaturesJava 8 Features
Java 8 Features
 
Project Jigsaw in JDK9
Project Jigsaw in JDK9Project Jigsaw in JDK9
Project Jigsaw in JDK9
 
New PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cNew PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12c
 
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDKComparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
Comparison between Oracle JDK, Oracle OpenJDK, and Red Hat OpenJDK
 
Microservices and Container
Microservices and ContainerMicroservices and Container
Microservices and Container
 

Similar to Moving Towards JDK 12

Is Java Still Free?
Is Java Still Free?Is Java Still Free?
Is Java Still Free?
Simon Ritter
 
20190713_MySQL開発最新動向
20190713_MySQL開発最新動向20190713_MySQL開発最新動向
20190713_MySQL開発最新動向
Machiko Ikoma
 
20190915_MySQL開発最新動向
20190915_MySQL開発最新動向20190915_MySQL開発最新動向
20190915_MySQL開発最新動向
Machiko Ikoma
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
VMware Tanzu
 
Illia shestakov - The Future of Java JDK #9
Illia shestakov - The Future of Java JDK #9Illia shestakov - The Future of Java JDK #9
Illia shestakov - The Future of Java JDK #9
Anna Shymchenko
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019
Shaun Smith
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
Mert Çalışkan
 
JDK 9: 55 New Features
JDK 9: 55 New FeaturesJDK 9: 55 New Features
JDK 9: 55 New Features
Simon Ritter
 
Keeping Up with Java: Look at All These New Features!
Keeping Up with Java: Look at All These New Features!Keeping Up with Java: Look at All These New Features!
Keeping Up with Java: Look at All These New Features!
VMware Tanzu
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013Martin Fousek
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
David Delabassee
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8
Simon Ritter
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
David Delabassee
 
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Patroklos Papapetrou (Pat)
 
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
Voxxed Days Thessaloniki
 
Java 40 versions_sgp
Java 40 versions_sgpJava 40 versions_sgp
Java 40 versions_sgp
michaelisvy
 
Project Jigsaw in JDK 9: Modularity Comes To Java
Project Jigsaw in JDK 9: Modularity Comes To JavaProject Jigsaw in JDK 9: Modularity Comes To Java
Project Jigsaw in JDK 9: Modularity Comes To Java
C4Media
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
CodeOps Technologies LLP
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production Environments
Bruno Borges
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
David Delabassee
 

Similar to Moving Towards JDK 12 (20)

Is Java Still Free?
Is Java Still Free?Is Java Still Free?
Is Java Still Free?
 
20190713_MySQL開発最新動向
20190713_MySQL開発最新動向20190713_MySQL開発最新動向
20190713_MySQL開発最新動向
 
20190915_MySQL開発最新動向
20190915_MySQL開発最新動向20190915_MySQL開発最新動向
20190915_MySQL開発最新動向
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 
Illia shestakov - The Future of Java JDK #9
Illia shestakov - The Future of Java JDK #9Illia shestakov - The Future of Java JDK #9
Illia shestakov - The Future of Java JDK #9
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
JDK 9: 55 New Features
JDK 9: 55 New FeaturesJDK 9: 55 New Features
JDK 9: 55 New Features
 
Keeping Up with Java: Look at All These New Features!
Keeping Up with Java: Look at All These New Features!Keeping Up with Java: Look at All These New Features!
Keeping Up with Java: Look at All These New Features!
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
 
55 New Features in Java SE 8
55 New Features in Java SE 855 New Features in Java SE 8
55 New Features in Java SE 8
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
 
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
 
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
Voxxed Days Thessaloniki 2016 - Keynote - JDK 9 : Big Changes To Make Java Sm...
 
Java 40 versions_sgp
Java 40 versions_sgpJava 40 versions_sgp
Java 40 versions_sgp
 
Project Jigsaw in JDK 9: Modularity Comes To Java
Project Jigsaw in JDK 9: Modularity Comes To JavaProject Jigsaw in JDK 9: Modularity Comes To Java
Project Jigsaw in JDK 9: Modularity Comes To Java
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production Environments
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 

More from Simon Ritter

Cloud Native Compiler
Cloud Native CompilerCloud Native Compiler
Cloud Native Compiler
Simon Ritter
 
Java On CRaC
Java On CRaCJava On CRaC
Java On CRaC
Simon Ritter
 
The Art of Java Type Patterns
The Art of Java Type PatternsThe Art of Java Type Patterns
The Art of Java Type Patterns
Simon Ritter
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
Simon Ritter
 
Java performance monitoring
Java performance monitoringJava performance monitoring
Java performance monitoring
Simon Ritter
 
Getting the Most From Modern Java
Getting the Most From Modern JavaGetting the Most From Modern Java
Getting the Most From Modern Java
Simon Ritter
 
Building a Better JVM
Building a Better JVMBuilding a Better JVM
Building a Better JVM
Simon Ritter
 
Java after 8
Java after 8Java after 8
Java after 8
Simon Ritter
 
Java Programming
Java ProgrammingJava Programming
Java Programming
Simon Ritter
 
The Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans TechnologyThe Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans Technology
Simon Ritter
 
Developing Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java TechnologyDeveloping Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java Technology
Simon Ritter
 
Building a Brain with Raspberry Pi and Zulu Embedded JVM
Building a Brain with Raspberry Pi and Zulu Embedded JVMBuilding a Brain with Raspberry Pi and Zulu Embedded JVM
Building a Brain with Raspberry Pi and Zulu Embedded JVM
Simon Ritter
 
It's Java, Jim, but not as we know it
It's Java, Jim, but not as we know itIt's Java, Jim, but not as we know it
It's Java, Jim, but not as we know it
Simon Ritter
 
Whats New For Developers In JDK 9
Whats New For Developers In JDK 9Whats New For Developers In JDK 9
Whats New For Developers In JDK 9
Simon Ritter
 
Streams: The Good, The Bad And The Ugly
Streams: The Good, The Bad And The UglyStreams: The Good, The Bad And The Ugly
Streams: The Good, The Bad And The Ugly
Simon Ritter
 
Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?
Simon Ritter
 

More from Simon Ritter (16)

Cloud Native Compiler
Cloud Native CompilerCloud Native Compiler
Cloud Native Compiler
 
Java On CRaC
Java On CRaCJava On CRaC
Java On CRaC
 
The Art of Java Type Patterns
The Art of Java Type PatternsThe Art of Java Type Patterns
The Art of Java Type Patterns
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
 
Java performance monitoring
Java performance monitoringJava performance monitoring
Java performance monitoring
 
Getting the Most From Modern Java
Getting the Most From Modern JavaGetting the Most From Modern Java
Getting the Most From Modern Java
 
Building a Better JVM
Building a Better JVMBuilding a Better JVM
Building a Better JVM
 
Java after 8
Java after 8Java after 8
Java after 8
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
The Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans TechnologyThe Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans Technology
 
Developing Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java TechnologyDeveloping Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java Technology
 
Building a Brain with Raspberry Pi and Zulu Embedded JVM
Building a Brain with Raspberry Pi and Zulu Embedded JVMBuilding a Brain with Raspberry Pi and Zulu Embedded JVM
Building a Brain with Raspberry Pi and Zulu Embedded JVM
 
It's Java, Jim, but not as we know it
It's Java, Jim, but not as we know itIt's Java, Jim, but not as we know it
It's Java, Jim, but not as we know it
 
Whats New For Developers In JDK 9
Whats New For Developers In JDK 9Whats New For Developers In JDK 9
Whats New For Developers In JDK 9
 
Streams: The Good, The Bad And The Ugly
Streams: The Good, The Bad And The UglyStreams: The Good, The Bad And The Ugly
Streams: The Good, The Bad And The Ugly
 
Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?
 

Recently uploaded

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 

Recently uploaded (20)

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 

Moving Towards JDK 12

  • 1. © Copyright Azul Systems 2019 © Copyright Azul Systems 2015 @speakjava Moving Towards JDK 12: Delivering New Java Features Simon Ritter Deputy CTO, Azul Systems 1
  • 2. © Copyright Azul Systems 2019 JDK 9: Big And Small Changes 2
  • 3. © Copyright Azul Systems 2019 Java Platform Module System (JPMS)  The core Java libraries are now a set of modules (JEP 220) – 75 OpenJDK modules: 26 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 2019 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 myimage …confbin jlink lib
  • 5. © Copyright Azul Systems 2019 Moving Java Forward Faster
  • 6. © Copyright Azul Systems 2019 OpenJDK: New Release Model  A new version of the JDK will be released every six months – March and September – Started last year with JDK 10 and JDK 11 – Continuing this year with JDK 12 and JDK 13  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 6
  • 7. © Copyright Azul Systems 2019 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  Last JDK 8 public update last week for commercial users!  Non-commercial users get updates until December 2020  JDK 11 is an LTS release  JDK 9 and JDK 10 are feature releases  Updated only until next release 7
  • 8. © Copyright Azul Systems 2019 Oracle 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 8
  • 9. © Copyright Azul Systems 2019 Converged Binaries Oracle JDK OpenJDK Java SE JDK 10 and earlier Java SE OpenJDK & Oracle JDK JDK 11 and later
  • 10. © Copyright Azul Systems 2019 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 10
  • 11. © Copyright Azul Systems 2019 JDK 9 Onwards And Compatibility 11 "Clean applications that just depend on java.se should just work" - Oracle
  • 12. © Copyright Azul Systems 2019 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  JDK 10 and 11 have continued this work  More features will be removed in the future  CMS GC, Nashorn and Pack200 all deprecated. Others? 12
  • 13. © Copyright Azul Systems 2019 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 13
  • 14. © Copyright Azul Systems 2019 Java Updates  Oracle JDK binary has LTS versions (JDK 11, 17, etc.) – Oracle OpenJDK does not  Oracle JDK 11 was released under a different license – Free for development and testing – Requires a Java SE subscription for use in production  Oracle OpenJDK binaries only updated for six months  JDK 8 can be used indefinitely for free – But without any further security patches and bug fixes 14
  • 15. © Copyright Azul Systems 2019 JDK 10
  • 16. © Copyright Azul Systems 2019 Local Variable Type Inference (JEP 286)  Java gets var 16 var userList = new ArrayList<String>(); // infers ArrayList<String> var stream = list.stream(); // infers Stream<String> for (var name : userList) { // infers String ... } for (var i; i < 10; i++) { // infers int ... }
  • 17. © Copyright Azul Systems 2019 var: Clearer try-with-resources 17 try (InputStream inputStream = socket.getInputStream(); InputStreamReader inputStreamReader = new inputStreamReader(is, UTF_8); BufferedReader bufferedReader = new BufferedReader(isr)) { // Use bufferedReader }
  • 18. © Copyright Azul Systems 2019 var: Clearer try-with-resources 18 try (var inputStream = socket.getInputStream(); var inputStreamReader = new inputStreamReader(is, UTF_8); var bufferedReader = new BufferedReader(isr)) { // Use bufferedReader }
  • 19. © Copyright Azul Systems 2019 var: Reserved Type (Not Keyword) var var = new ValueAddedReseller(); public class var { public var(String x) { ... } } public class Var { public Var(String x) { ... } }
  • 20. © Copyright Azul Systems 2019 JDK 10: JEPs  JEP 307: Parallel Full GC for G1  JEP 310: Application Class-Data Sharing  JEP 317: Experimental Java-based JIT compiler (Graal)  JEP 319: Root Certificates  JEP 296: Consolidate JDK forests into single repo 20
  • 21. © Copyright Azul Systems 2019 JDK 10: JEPs  JEP 316: Heap allocation on alternative devices (Intel)  JEP 313: Remove javah tool  JEP 304: Garbage Collector Interface (Red Hat)  JEP 312: Thread-Local Handshakes 21
  • 22. © Copyright Azul Systems 2019 JDK 10: APIs  73 New APIs – List, Set, Map.copyOf(Collection) – Collectors  toUnmodifiableList  toUnmodifiableMap  toUnmodifiableSet – Optional.orElseThrow() 22
  • 23. © Copyright Azul Systems 2019 JDK 11
  • 24. © Copyright Azul Systems 2019 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) 24
  • 25. © Copyright Azul Systems 2019 323: Extend Local-Variable Syntax  Local-variable syntax for lambda parameters 25 list.stream() .map(s -> s.toLowerCase()) .collect(Collectors.toList()); list.stream() .map((var s) -> s.toLowerCase()) .collect(Collectors.toList()); list.stream() .map((@Notnull var s) -> s.toLowerCase()) .collect(Collectors.toList());
  • 26. © Copyright Azul Systems 2019 327: Unicode 10 Support  8,518 new characters (seriously) – Bitcoin symbol – Nishu – Soyombo, Zanabazar Square  The long awaited (?) Colbert emoji 26
  • 27. © Copyright Azul Systems 2019 330: Launch Single File Source Code  JDK 10 has three modes for the Java launcher – Launch a class file – Launch the main class of a JAR file – Launch the main class of a module  JDK 11 adds a forth – Launch a class declared in a source file 27 $ java Factorial.java 4
  • 28. © Copyright Azul Systems 2019 Single File Source Code Shebang 28 #!$JAVA_HOME/bin/java --source 11 public class Factorial { public static void main(String[] args) { int n = Integer.parseInt(args[0]); int r = (n == 0) ? 0 : 1; for (int i = 1; i <= n; i++) r *= i; System.out.println("n = " + n + ", n! = " + r); } } $ ./Factorial 4 n = 4, n! = 24
  • 29. © Copyright Azul Systems 2019 Other JDK 11 JEPs  181: Nest-based Access Control  309: Dynamic Class-file constants  321: HTTP client  324: Key Agreement with Curve25519 and Curve448  329: ChaCha20 and Poly1305 Cryptographic Algorithms  332: Transport Layer Security (TLS) 1.3  333: ZGC: Experimental low-latency collector  335: Deprecate the Nashorn JavaScript Engine  336: Deprecate the Pack200 Tools and API 29
  • 30. © Copyright Azul Systems 2019 New APIs  New I/O methods  InputStream nullInputStream()  OutputStream nullOutputStream()  Reader nullReader()  Writer nullWriter()  Optional  isEmpty() // Opposite of isPresent  Character  toString(int) // Unicode codepoint 30
  • 31. © Copyright Azul Systems 2019 New APIs  New String methods – isBlank() – Stream lines() – String repeat(int) – String strip() – String stripLeading() – String stripTrailing() 31
  • 32. © Copyright Azul Systems 2019 New APIs  Predicate not(Predicate) 32 lines.stream() .filter(s -> !s.isBlank()) lines.stream() .filter(Predicate.not(String::isBlank)) lines.stream() .filter(not(String::isBlank))
  • 33. © Copyright Azul Systems 2019 JDK 11: Modules Removed – The java.se.ee aggregator-module has been removed  java.corba  java.transaction  java.activation  java.xml.bind  java.xml.ws  java.xml.ws.annotation 33
  • 34. © Copyright Azul Systems 2019 Command Line -XX Flags  Big changes  JDK 9 – Removed 187, added 123  JDK 10 – Removed 36, added 26  JDK 11 – Removed 27, added 53 34 chriswhocodes.com/hotspot_option_differences.html
  • 35. © Copyright Azul Systems 2019 What Will Be in JDK 12?
  • 36. © Copyright Azul Systems 2019 JEP 325: Switch Expressions (Preview) 36 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); };
  • 37. © Copyright Azul Systems 2019 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); };
  • 38. © Copyright Azul Systems 2019 JEPs  189: Shenandoah GC (Experimental)  G1 GC updates – 344: Abortable mixed collections – 346: Return unused committed memory  334: JVM constant API  230: Microbenchmark suite  341: Default CDS archive
  • 39. © Copyright Azul Systems 2019 New APIs  Collectors – teeing(Collector, Collector, BiFunction)  Class – describeConstable  CompletableFuture/CompletionStage – Five new methods for exceptions in CompletionStage 39
  • 40. © Copyright Azul Systems 2019 Longer Term JDK Futures
  • 41. © Copyright Azul Systems 2019 Project Amber  Simplifying Java language syntax  JEP 302: Lambda leftovers – Single underscore for unused parameters  JEP 326: Raw string literals – Use single backquote – `c:Userssimon` – ```A string with a `` in it``` 41
  • 42. © Copyright Azul Systems 2019 JEP 305: Pattern Matching  Type test and switch statement support to start 42 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(); }
  • 43. © Copyright Azul Systems 2019 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 43
  • 44. © Copyright Azul Systems 2019 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 44
  • 45. © Copyright Azul Systems 2019 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 45
  • 46. © Copyright Azul Systems 2019 Azul's Zulu Java
  • 47. © Copyright Azul Systems 2019 Zulu Java  Azul’s binary distribution of OpenJDK – Passes all TCK tests  JDK 6, 7, 8, 9, 10 and 11 available  Wide platform support: – Intel 64-bit Windows, Mac, Linux – Intel 32-bit Windows and Linux – ARM 32 and 64-bit – PowerPC 47 www.azul.com/downloads/zulu
  • 48. © Copyright Azul Systems 2019 Zulu Extended Support  Backporting of bug fixes and security patches from supported OpenJDK release  Zulu 8 supported until March 2026  LTS releases have 9 years active + 2 years passive support  Medium Term Support releases – Two interim releases between LTS releases (9, 13, 15...) – Bridge to LTS releases – Supported until 18 months after next LTS release 48
  • 49. © Copyright Azul Systems 2019 Zulu Complete Support  24x7x365 or 8x5 telephone and e-mail contact – Report JDK-related problems  Follow-the-sun engineering team – Highly experienced engineers – Many ex-Sun and ex-Oracle Java team  Root-cause and fix problems – Generate custom JDK binaries for fixes – Upstream fixes to OpenJDK where possible 49
  • 50. © Copyright Azul Systems 2019 Azul Zulu Extended (Passive) Commercial Support 2020 2021 8(LTS) 19 18 17(LTS) 16 15 14 13 12 11(LTS) 10 9 7(LTS) 2017 2018 Oracle Publicly available binaries (unsupported) 14 13 12 11(LTS) 10 9 8(LTS) 7(LTS) Oracle Commercial Support Oracle Extended Commercial Support Azul Zulu Community Builds 20222019 Azul Zulu Production Commercial Support 2023 2024 19 18 17(LTS) 16 15 Azul Zulu MTS Support Bridge to next LTS Azul Zulu LTS Support 8 years active JavaSEVersionJava SE Lifecycle: 5+ Years
  • 51. © Copyright Azul Systems 2019 Summary
  • 52. © Copyright Azul Systems 2019 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 52
  • 53. © Copyright Azul Systems 2019 © Copyright Azul Systems 2015 @speakjava Thank You! Simon Ritter Deputy CTO, Azul Systems 53

Editor's Notes

  1. 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.
  2. 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.
  3. JEP 312: Global safepoint