SlideShare una empresa de Scribd logo
1 de 49
© 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

Más contenido relacionado

La actualidad más candente

Java Is Still Free
Java Is Still FreeJava Is Still Free
Java Is Still FreeSimon Ritter
 
JDK 9: Migrating Applications
JDK 9: Migrating ApplicationsJDK 9: Migrating Applications
JDK 9: Migrating ApplicationsSimon 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
 
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 SmallerSimon Ritter
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9Simon Ritter
 
Java 12 - New features in action
Java 12 -   New features in actionJava 12 -   New features in action
Java 12 - New features in actionMarco Molteni
 
The latest features coming to Java 12
The latest features coming to Java 12The latest features coming to Java 12
The latest features coming to Java 12NexSoftsys
 
JDK 14 Lots of New Features
JDK 14 Lots of New FeaturesJDK 14 Lots of New Features
JDK 14 Lots of New FeaturesSimon Ritter
 
Java 9 Modularity and Project Jigsaw
Java 9 Modularity and Project JigsawJava 9 Modularity and Project Jigsaw
Java 9 Modularity and Project JigsawComsysto Reply GmbH
 
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Simon 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 9Simon Ritter
 
Java: Create The Future Keynote
Java: Create The Future KeynoteJava: Create The Future Keynote
Java: Create The Future KeynoteSimon Ritter
 
Java 10 New Features
Java 10 New FeaturesJava 10 New Features
Java 10 New FeaturesAli BAKAN
 
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)
 
JDK 9 Java Platform Module System
JDK 9 Java Platform Module SystemJDK 9 Java Platform Module System
JDK 9 Java Platform Module SystemWolfgang Weigend
 
Project Jigsaw in JDK9
Project Jigsaw in JDK9Project Jigsaw in JDK9
Project Jigsaw in JDK9Simon Ritter
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9Deepu Xavier
 

La actualidad más candente (20)

Java Is Still Free
Java Is Still FreeJava Is Still Free
Java Is Still Free
 
JDK 9: Migrating Applications
JDK 9: Migrating ApplicationsJDK 9: Migrating Applications
JDK 9: Migrating Applications
 
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?
 
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
 
What's New in Java 9
What's New in Java 9What's New in Java 9
What's New in Java 9
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 
Java 12 - New features in action
Java 12 -   New features in actionJava 12 -   New features in action
Java 12 - New features in action
 
The latest features coming to Java 12
The latest features coming to Java 12The latest features coming to Java 12
The latest features coming to Java 12
 
JDK-9: Modules and Java Linker
JDK-9: Modules and Java LinkerJDK-9: Modules and Java Linker
JDK-9: Modules and Java Linker
 
JDK 14 Lots of New Features
JDK 14 Lots of New FeaturesJDK 14 Lots of New Features
JDK 14 Lots of New Features
 
Java 9 Modularity and Project Jigsaw
Java 9 Modularity and Project JigsawJava 9 Modularity and Project Jigsaw
Java 9 Modularity and Project Jigsaw
 
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
 
Java: Create The Future Keynote
Java: Create The Future KeynoteJava: Create The Future Keynote
Java: Create The Future Keynote
 
Java 9 preview
Java 9 previewJava 9 preview
Java 9 preview
 
Java 10 New Features
Java 10 New FeaturesJava 10 New Features
Java 10 New Features
 
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
 
JDK 9 Java Platform Module System
JDK 9 Java Platform Module SystemJDK 9 Java Platform Module System
JDK 9 Java Platform Module System
 
Project Jigsaw in JDK9
Project Jigsaw in JDK9Project Jigsaw in JDK9
Project Jigsaw in JDK9
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9
 

Similar a JDK 9, 10, 11 and Beyond

Is Java Still Free?
Is Java Still Free?Is Java Still Free?
Is Java Still Free?Simon Ritter
 
How to Choose a JDK
How to Choose a JDKHow to Choose a JDK
How to Choose a JDKSimon Ritter
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9VMware Tanzu
 
JDK 9: 55 New Features
JDK 9: 55 New FeaturesJDK 9: 55 New Features
JDK 9: 55 New FeaturesSimon Ritter
 
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 #9Anna Shymchenko
 
Contributing to JDK Mission Control
Contributing to JDK Mission ControlContributing to JDK Mission Control
Contributing to JDK Mission ControlMarcus Hirt
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"GlobalLogic Ukraine
 
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 PrimeFacesMert Çalışkan
 
Open Source In The World Of Java
Open Source In The World Of JavaOpen Source In The World Of Java
Open Source In The World Of JavaJamie Coleman
 
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
 
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 8Simon Ritter
 
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?What's New in the JVM in Java 8?
What's New in the JVM in Java 8?Azul Systems Inc.
 
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?What's New in the JVM in Java 8?
What's New in the JVM in Java 8?Azul Systems, Inc.
 
Update from android kk to android l
Update from android kk to android lUpdate from android kk to android l
Update from android kk to android lBin Yang
 
Java 40 versions_sgp
Java 40 versions_sgpJava 40 versions_sgp
Java 40 versions_sgpmichaelisvy
 
20190713_MySQL開発最新動向
20190713_MySQL開発最新動向20190713_MySQL開発最新動向
20190713_MySQL開発最新動向Machiko Ikoma
 
QConSP 2018 - Java Module System
QConSP 2018 - Java Module SystemQConSP 2018 - Java Module System
QConSP 2018 - Java Module SystemLeonardo Zanivan
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023VMware Tanzu
 

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

Is Java Still Free?
Is Java Still Free?Is Java Still Free?
Is Java Still Free?
 
How to Choose a JDK
How to Choose a JDKHow to Choose a JDK
How to Choose a JDK
 
55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 
JDK 9: 55 New Features
JDK 9: 55 New FeaturesJDK 9: 55 New Features
JDK 9: 55 New Features
 
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
 
Javantura v6 - JDK 11 & JDK 12 - Dalibor Topic
Javantura v6 - JDK 11 & JDK 12 - Dalibor TopicJavantura v6 - JDK 11 & JDK 12 - Dalibor Topic
Javantura v6 - JDK 11 & JDK 12 - Dalibor Topic
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Contributing to JDK Mission Control
Contributing to JDK Mission ControlContributing to JDK Mission Control
Contributing to JDK Mission Control
 
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
Java Webinar #12: "Java Versions and Features: Since JDK 8 to 16"
 
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
 
Open Source In The World Of Java
Open Source In The World Of JavaOpen Source In The World Of Java
Open Source In The World Of Java
 
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
 
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
 
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
 
What's New in the JVM in Java 8?
What's New in the JVM in Java 8?What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
 
Update from android kk to android l
Update from android kk to android lUpdate from android kk to android l
Update from android kk to android l
 
Java 40 versions_sgp
Java 40 versions_sgpJava 40 versions_sgp
Java 40 versions_sgp
 
20190713_MySQL開発最新動向
20190713_MySQL開発最新動向20190713_MySQL開発最新動向
20190713_MySQL開発最新動向
 
QConSP 2018 - Java Module System
QConSP 2018 - Java Module SystemQConSP 2018 - Java Module System
QConSP 2018 - Java Module System
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 

Más de Simon Ritter

Cloud Native Compiler
Cloud Native CompilerCloud Native Compiler
Cloud Native CompilerSimon Ritter
 
The Art of Java Type Patterns
The Art of Java Type PatternsThe Art of Java Type Patterns
The Art of Java Type PatternsSimon Ritter
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java WorkshopSimon Ritter
 
Java performance monitoring
Java performance monitoringJava performance monitoring
Java performance monitoringSimon Ritter
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java WorkshopSimon Ritter
 
Getting the Most From Modern Java
Getting the Most From Modern JavaGetting the Most From Modern Java
Getting the Most From Modern JavaSimon Ritter
 
Building a Better JVM
Building a Better JVMBuilding a Better JVM
Building a Better JVMSimon Ritter
 
The Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans TechnologyThe Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans TechnologySimon Ritter
 
Developing Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java TechnologyDeveloping Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java TechnologySimon 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 JVMSimon 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 itSimon 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 9Simon 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 UglySimon Ritter
 

Más de 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
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
 
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
 

Último

Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfIdiosysTechnologies1
 
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
 
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
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
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
 
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
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
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
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
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
 
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
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 

Último (20)

Best Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdfBest Web Development Agency- Idiosys USA.pdf
Best Web Development Agency- Idiosys USA.pdf
 
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
 
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
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
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
 
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
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
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...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
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 - ...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
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...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 

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

Notas del editor

  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. 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).
  4. JEP 312: Global safepoint