SlideShare una empresa de Scribd logo
1 de 61
© Copyright Azul Systems 2016
© Copyright Azul Systems 2015
@speakjava
JDK 9: Big Changes
To Make Java Smaller
Simon Ritter
Deputy CTO, Azul Systems
1
© Copyright Azul Systems 2016
API Structural Changes
© Copyright Azul Systems 2016
API Classification
 Supported, intended for public use
– JCP specified: java.*, javax.*
– JDK specific: some com.sun.*, some jdk.*
 Unsupported, not intended for public use
– Mostly sun.*
– Most infamous is sun.misc.Unsafe
3
© Copyright Azul Systems 2016
General Java Compatability Policy
 If an application uses only supported APIs on version N of
Java it should work on version N+1, even without
recompilation
 Supported APIs can be removed
–But only with advanced notice
 JDK 8 has 18 interfaces, 23 classes, 64 fields, 358
methods and 20 constructors that have been deprecated
–None have been removed
–Until now
4
© Copyright Azul Systems 2016
JDK 9: Incompatible Changes
 Encapsulate most JDK internal APIs
 Remove a small number of supported APIs
– 6 in total, all add/remove PropertyChangeListener
– Already flagged in JSR 337 (Java SE 8), JEP 162
 Change the binary structure of the JRE and JDK
 New version string format
 A single underscore will no longer be allowed as an
identifier in source code
5
© Copyright Azul Systems 2016
Removed In JDK 9
 Endorsed standard API override mechanism
 Extension mechanism
 No longer required now we have a module system
6
© Copyright Azul Systems 2016
Most Popular Unsupported APIs
1. sun.misc.BASE64Encoder
2. sun.misc.Unsafe
3. sun.misc.BASE64Decoder
7
Oracle dataset based on internal application code
© Copyright Azul Systems 2016
JDK Internal API Classification
 Non-critical
– Little or no use outside the JDK
– Used only for convenience (alternatives exist)
 Critical
– Functionality that would be difficult, if not impossible to
implement outside the JDK
8
© Copyright Azul Systems 2016
JEP 260 Proposal
 Encapsulate all non-critical JDK-internal APIs
 Encapsulate all critical JDK-internal APIs, for which
supported replacements exist in JDK 8
 Do not encapsulate other critical JDK-internal APIs
– Deprecate these in JDK 9
– Plan to encapsulate or remove them in JDK 10
– Provide command-line option to access encapsulated
critical APIs
9
© Copyright Azul Systems 2016
JEP 260 Accessible Critical APIs
 sun.misc.Unsafe
 sun.misc.Signal
 sun.misc.SignalHandler
 sun.misc.Cleaner
 sun.reflect.Reflection.getCallerClass
 sun.reflect.ReflectionFactory
10
© Copyright Azul Systems 2016
Reviewing Your Own Code
 jdeps tool
– Introduced in JDK 8, improved in JDK 9
– Maven jdeps plugin
jdeps –jdkinternals path/myapp.jar
11
path/myapp.jar -> /opt/jdk1.8.0/jre/lib/rt.jar
<unnamed> (myapp.jar)
-> sun.misc.Unsafe
-> ...
© Copyright Azul Systems 2016
Project Jigsaw And Modules
© Copyright Azul Systems 2016
Goals For Project Jigsaw
 Make Java SE more scalable and flexible
– Internet of Things
– Microservices
 Improve security, maintainability and performance
 Simplify construction, deployment and maintenance of
large scale applications
 Eliminate classpath hell
13
© Copyright Azul Systems 2016
Module Fundamentals
 Module is a grouping of code
– For Java this is a collection of packages
 Modules can contain other things
– Native code
– Resources
– Configuration data
14
com.azul.zoop
com.azul.zoop.alpha.Name
com.azul.zoop.alpha.Position
com.azul.zoop.beta.Animal
com.azul.zoop.beta.Reptile
com.azul.zoop.theta.Zoo
com.azul.zoop.theta.Lake
© Copyright Azul Systems 2016
Module Declaration
15
module com.azul.zoop {
}
module-info.java
com/azul/zoop/alpha/Name.java
com/azul/zoop/alpha/Position.java
com/azul/zoop/beta/Animal.java
com/azul/zoop/beta/Reptile.java
com/azul/zoop/theta/Zoo.java
com/azul/zoop/theta/Lake.java
© Copyright Azul Systems 2016
Module Dependencies
module com.azul.zoop {
requires com.azul.zeta;
} com.azul.zoop
com.azul.zeta
© Copyright Azul Systems 2016
Module Dependencies
module com.azul.app {
requires com.azul.zoop;
requires java.sql;
}
com.azul.app
com.azul.zoop java.sql
© Copyright Azul Systems 2016
Module Dependency Graph
com.azul.app
java.base
java.sqlcom.azul.zoop
com.azul.zeta
java.xml java.logging
explicit
implicit
© Copyright Azul Systems 2016
Readability v. Dependency
com.azul.app
java.sql
java.logging
module java.sql {
requires public java.logging;
}
Driver d = …
Logger l = d.getParentLogger();
l.log(“azul’);
Implied readability
© Copyright Azul Systems 2016
Module Implied Readability Graph
com.azul.app
java.base
java.sqlcom.azul.zoop
com.azul.zeta
java.xml java.logging
explicit
implicit
implied
© Copyright Azul Systems 2016
Package Visibility
module com.azul.zoop {
requires com.azul.zeta;
exports com.azul.zoop.alpha;
exports com.azul.zoop.beta to com.azul.app;
}
com.azul.zoop
com.azul.zoop.alpha
com.azul.zoop.beta
com.azul.zoop.thetacom.azul.app only
© Copyright Azul Systems 2016
More Package Visibility
weak module com.azul.zoop {
requires com.azul.zeta;
}
com.azul.zoop
com.azul.zoop.alpha
com.azul.zoop.beta com.azul.zoop.theta
© Copyright Azul Systems 2016
Even More Package Visibility
module com.azul.zoop {
requires com.azul.zeta;
exports com.azul.zoop.alpha;
exports com.azul.zoop.beta to com.azul.app;
exports private com.azul.theta;
}
com.azul.zoop
com.azul.zoop.theta
REFLECTIONGENERAL
com.azul.zoop.alpha
com.azul.zoop.beta
com.azul.app only
© Copyright Azul Systems 2016
Restricted Keywords
module
requires requires;
exports exports;
module {
}
© Copyright Azul Systems 2016
Accessibility
 For a package to be visible
– The package must be exported by the containing module
– The containing module must be read by the using module
 Public types from those packages can then be used
com.azul.zoopcom.azul.app
reads
© Copyright Azul Systems 2016
Java Accessibility (pre-JDK 9)
public
protected
<package>
private
© Copyright Azul Systems 2016
Java Accessibility (JDK 9)
public to everyone
public, but only to specific modules
public only within a module
protected
<package>
private
public ≠ accessible (fundamental change to Java)
© Copyright Azul Systems 2016
JDK 8 Dependencies
© Copyright Azul Systems 2016
JDK 9 Platform Modules
29
java.se
java.compact3
java.compact2
java.compact1
java.scripting
java.instrument
java.base
java.logging
java.sql
java.sql.rowset
java.xml
java.desktop
java.rmi
java.prefs
java.datatransfer
java.compiler
java.management
java.security.jgss
java.naming
java.security.sasl
All modules depend on java.base
no implied
readability=
© Copyright Azul Systems 2016
JDK 9 Platform Modules
30
java.se.e
e
java.se
java.xml.bind
java.corba
java.compiler
java.desktop
java.annotations.common
java.rmi
java.datatransfer
java.management
java.xml.ws
java.naming
java.transaction
java.activation
All modules depend on java.base
© Copyright Azul Systems 2016
Using Modules
© Copyright Azul Systems 2016
Module Path
$ javac –modulepath dir1:dir2:dir3
© Copyright Azul Systems 2016
Compilation With Module Path
33
$ javac –modulepath mods –d mods 
src/module-info.java 
src/com/azul/zoop/alpha/Name.java
mods/module-info.class
mods/com/azul/zoop/alpha/Name.class
src/module-info.java
src/com/azul/zoop/alpha/Name.java
© Copyright Azul Systems 2016
Application Execution
 -modulepath can be abbreviated to -mp
$ java –mp mods –m com.azul.app/com.azul.app.Main
Azul application initialised!
module name main class
© Copyright Azul Systems 2016
Packaging With Modular JAR Files
mods/module-info.class
mods/com/azul/app/Main.class
$ jar --create --file mylib/app.jar 
--main-class com.azul.app.Main 
-C mods .
module-info.class
com/azul/app/Main.class
app.jar
© Copyright Azul Systems 2016
JAR Files & Module Information
$ jar --file mylib/app.jar –p
Name:
com.azul.zoop
Requires:
com.azul.zeta
java.base [MANDATED]
java.sql
Main class:
com.azul.zoop.Main
© Copyright Azul Systems 2016
Application Execution (JAR)
$ java –mp mylib:mods –m com.azul.app
Azul application initialised!
© Copyright Azul Systems 2016
Linking
Modular run-time
image
…confbin
jlink
$ jlink --modulepath $JDKMODS 
--addmods java.base –output myimage
$ myimage/bin/java –listmods
java.base@9.0
© Copyright Azul Systems 2016
Linking An Application
$ jlink --modulepath $JDKMODS:$MYMODS 
--addmods com.azul.app –output myimage
$ myimage/bin/java –listmods
java.base@9.0
java.logging@9.0
java.sql@9.0
java.xml@9.0
com.azul.app@1.0
com.azul.zoop@1.0
com.azul.zeta@1.0
Version numbering for
information purposes only
“It is not a goal of the module
system to solve the version-
selection problem”
© Copyright Azul Systems 2016
Application Migration
© Copyright Azul Systems 2016
Typical Application (JDK 8)
jar
jar
jar
JDK
jar
jarjar
jar jar
jar
jar
jar
jar
Classpath
© Copyright Azul Systems 2016
Typical Application (JDK 9)
jar
jar
jar
module
java.base
module
java.desktop
module
java.datatransfer
module
java.xml
jar
jarjar
jar jar
jar
jar
jar
jar
Unnamed
module
© Copyright Azul Systems 2016
Sample Application
myapp.ja
r
libgl.jar
mylib.jar
gluegen.jar jogl.jar
module
java.base
module
java.desktop
module
java.datatransfer
module
java.xml
© Copyright Azul Systems 2016
Run Application With Classpath
$ java –classpath 
lib/myapp.jar: 
lib/mylib.jar: 
lib/libgl.jar: 
lib/gluegen.jar: 
lib/jogl.jar: 
myapp.Main
© Copyright Azul Systems 2016
Sample Application
module
myapp.ja
r
libgl.jar
module
mylib.jar
gluegen.jar jogl.jar
module
java.base
module
java.desktop
module
java.datatransfer
module
java.xml
© Copyright Azul Systems 2016
Application module-info.java
module myapp {
requires mylib;
requires java.base;
requires java.sql;
requires libgl; ????
requires gluegen; ????
requires jogl; ????
}
© Copyright Azul Systems 2016
Sample Application
module
myapp.ja
r
module
libgl.jar
module
mylib.jar
module
gluegen.jar
module
jogl.jar
module
java.base
module
java.desktop
module
java.datatransfer
module
java.xml
© Copyright Azul Systems 2016
Automatic Modules
 Real modules
 Simply place unmodified jar file on module path
– Rather than classpath
 No changes to JAR file
 Module name derived from JAR file name
 Exports all its packages
– No selectivity
 Automatically requires all modules on the module path
48
© Copyright Azul Systems 2016
Application Module Dependencies
module
myapp.ja
r
module
libgl.jar
module
mylib.jar
module
gluegen.jar
module
jogl.jar
module
java.base
module
java.desktop
module
java.datatransfer
module
java.xml
Implicit
Explicit
© Copyright Azul Systems 2016
Run Application With Modules
$ java –classpath 
lib/myapp.jar: 
lib/mylib.jar: 
lib/libgl.jar: 
lib/gluegen.jar: 
lib/jogl.jar: 
myapp.Main
$ java –mp mylib:lib –m myapp
© Copyright Azul Systems 2016
Advanced Details
© Copyright Azul Systems 2016
Modular Jar Files And JMODs
 Modular jar files are simple
– Standard jar file possibly with module-info.class file
– Can use existing (unmodified) jar files
 JMOD files
– More complex module files
– Used for modules in the JDK
– Can include native files (JNI), configuration files and
other data
– Based on zip file format (pending final details - JEP 261)
52
© Copyright Azul Systems 2016
jmod Command
 Create can specify several details:
– Main class
– Native libraries and commands
– Configuration data
– OS name, version and machine architecture
 Details included in module-info.class file
53
jmod (create | list | describe) <options> <jmod-file>
© Copyright Azul Systems 2016
Classloaders (Since JDK 1.2)
54
Bootstrap classloader (Internal Class)
Bootstrap Class Path
Extension classloader (URLClassLoader)
Extension Mechanism
Application classloader (URLClassLoader)
Class Path
© Copyright Azul Systems 2016
Classloaders (JDK 9)
55
Bootstrap classloader (Internal Class)
bootstrap class path
Platform classloader (Internal Class)
JDK classes with specific permissions
Application classloader (Internal Class)
Class & Module Path
© Copyright Azul Systems 2016
Summary
© Copyright Azul Systems 2016
Tooling Support
 NetBeans leads the way
 Early Access NetBeans 9 available
 Support for module-info.java file
– Graphing of dependencies
57
© Copyright Azul Systems 2016
Summary
 Modularisation is a big change for Java
– JVM/JRE rather than language/APIs
 Potentially disruptive changes to exposure of non-public APIs
– Is it safe?
 Developing modular code will require some learning
– Not a huge change, though
58
© Copyright Azul Systems 2016
Zulu.org
 Azul binary distribution of OpenJDK source code
 Passed all TCK tests
 Completely FREE!
– Pay us if you’d like enterprise level support
 Just announced: Embedded Zulu support for ARM 32-bit
– Intel already supported
– “Requires no licensing fee”
59
© Copyright Azul Systems 2016
Further Information
 openjdk.java.net
 openjdk.java.net/jeps
 openjdk.java.net/projects/jigsaw
 jcp.org
60
© Copyright Azul Systems 2016
© Copyright Azul Systems 2015
@speakjava
Questions
Simon Ritter
Deputy CTO, Azul Systems
61

Más contenido relacionado

La actualidad más candente

JDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and BeyondJDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and BeyondSimon Ritter
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Martin Toshev
 
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
 
JDK 9: The Start of a New Future for Java
JDK 9: The Start of a New Future for JavaJDK 9: The Start of a New Future for Java
JDK 9: The Start of a New Future for JavaSimon Ritter
 
Moving Towards JDK 12
Moving Towards JDK 12Moving Towards JDK 12
Moving Towards JDK 12Simon 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
 
Project Jigsaw in JDK9
Project Jigsaw in JDK9Project Jigsaw in JDK9
Project Jigsaw in JDK9Simon Ritter
 
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
 
Java Support: What's changing
Java Support:  What's changingJava Support:  What's changing
Java Support: What's changingSimon Ritter
 
JDK 9: Migrating Applications
JDK 9: Migrating ApplicationsJDK 9: Migrating Applications
JDK 9: Migrating ApplicationsSimon Ritter
 
Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pavel Bucek
 
JDK 9: 55 New Features
JDK 9: 55 New FeaturesJDK 9: 55 New Features
JDK 9: 55 New FeaturesSimon Ritter
 
Functional programming with_jdk8-s_ritter
Functional programming with_jdk8-s_ritterFunctional programming with_jdk8-s_ritter
Functional programming with_jdk8-s_ritterSimon Ritter
 
Java EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil GaurJava EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil GaurTakashi Ito
 
JDK 9 Java Platform Module System
JDK 9 Java Platform Module SystemJDK 9 Java Platform Module System
JDK 9 Java Platform Module SystemWolfgang Weigend
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkStephen Chin
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Shaun Smith
 
Java 9 New Features
Java 9 New FeaturesJava 9 New Features
Java 9 New FeaturesAli BAKAN
 

La actualidad más candente (20)

JDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and BeyondJDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and Beyond
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
 
Java 9 Modularity and Project Jigsaw
Java 9 Modularity and Project JigsawJava 9 Modularity and Project Jigsaw
Java 9 Modularity and Project Jigsaw
 
JDK 9: The Start of a New Future for Java
JDK 9: The Start of a New Future for JavaJDK 9: The Start of a New Future for Java
JDK 9: The Start of a New Future for Java
 
Moving Towards JDK 12
Moving Towards JDK 12Moving Towards JDK 12
Moving Towards JDK 12
 
Java 12 - New features in action
Java 12 -   New features in actionJava 12 -   New features in action
Java 12 - New features in action
 
Project Jigsaw in JDK9
Project Jigsaw in JDK9Project Jigsaw in JDK9
Project Jigsaw in JDK9
 
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
 
Java Support: What's changing
Java Support:  What's changingJava Support:  What's changing
Java Support: What's changing
 
JDK 9: Migrating Applications
JDK 9: Migrating ApplicationsJDK 9: Migrating Applications
JDK 9: Migrating Applications
 
Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9
 
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
Java 2012 conference keynote - Java Strategy & Roadmap - WebLogic & GlassFish...
 
JDK 9: 55 New Features
JDK 9: 55 New FeaturesJDK 9: 55 New Features
JDK 9: 55 New Features
 
Java Modularity: the Year After
Java Modularity: the Year AfterJava Modularity: the Year After
Java Modularity: the Year After
 
Functional programming with_jdk8-s_ritter
Functional programming with_jdk8-s_ritterFunctional programming with_jdk8-s_ritter
Functional programming with_jdk8-s_ritter
 
Java EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil GaurJava EE, What's Next? by Anil Gaur
Java EE, What's Next? by Anil Gaur
 
JDK 9 Java Platform Module System
JDK 9 Java Platform Module SystemJDK 9 Java Platform Module System
JDK 9 Java Platform Module System
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring Framework
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019
 
Java 9 New Features
Java 9 New FeaturesJava 9 New Features
Java 9 New Features
 

Destacado

55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9Simon Ritter
 
It's Java Jim, But Not As We Know It!
It's Java Jim, But Not As We Know It!It's Java Jim, But Not As We Know It!
It's Java Jim, But Not As We Know It!Simon Ritter
 
Lessons Learnt With Lambdas and Streams in JDK 8
Lessons Learnt With Lambdas and Streams in JDK 8Lessons Learnt With Lambdas and Streams in JDK 8
Lessons Learnt With Lambdas and Streams in JDK 8Simon Ritter
 
Lambdas Hands On Lab
Lambdas Hands On LabLambdas Hands On Lab
Lambdas Hands On LabSimon Ritter
 
Lambdas And Streams Hands On Lab, JavaOne 2014
Lambdas And Streams Hands On Lab, JavaOne 2014Lambdas And Streams Hands On Lab, JavaOne 2014
Lambdas And Streams Hands On Lab, JavaOne 2014Simon Ritter
 
Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8Simon Ritter
 
I/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew KurniadiI/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew KurniadiDicoding
 
Java 8 and 9 in Anger
Java 8 and 9 in AngerJava 8 and 9 in Anger
Java 8 and 9 in AngerTrisha Gee
 
Java 9 Functionality and Tooling
Java 9 Functionality and ToolingJava 9 Functionality and Tooling
Java 9 Functionality and ToolingTrisha Gee
 
Migrating to IntelliJ IDEA from Eclipse
Migrating to IntelliJ IDEA from EclipseMigrating to IntelliJ IDEA from Eclipse
Migrating to IntelliJ IDEA from EclipseTrisha Gee
 
Java 9 – The Ultimate Feature List
Java 9 – The Ultimate Feature ListJava 9 – The Ultimate Feature List
Java 9 – The Ultimate Feature ListTakipi
 
New Features in JDK 8
New Features in JDK 8New Features in JDK 8
New Features in JDK 8Martin Toshev
 
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
 

Destacado (16)

55 New Features in JDK 9
55 New Features in JDK 955 New Features in JDK 9
55 New Features in JDK 9
 
It's Java Jim, But Not As We Know It!
It's Java Jim, But Not As We Know It!It's Java Jim, But Not As We Know It!
It's Java Jim, But Not As We Know It!
 
Lessons Learnt With Lambdas and Streams in JDK 8
Lessons Learnt With Lambdas and Streams in JDK 8Lessons Learnt With Lambdas and Streams in JDK 8
Lessons Learnt With Lambdas and Streams in JDK 8
 
Using Java 8 on Android
Using Java 8 on AndroidUsing Java 8 on Android
Using Java 8 on Android
 
Lambdas Hands On Lab
Lambdas Hands On LabLambdas Hands On Lab
Lambdas Hands On Lab
 
The Java Carputer
The Java CarputerThe Java Carputer
The Java Carputer
 
Lambdas And Streams Hands On Lab, JavaOne 2014
Lambdas And Streams Hands On Lab, JavaOne 2014Lambdas And Streams Hands On Lab, JavaOne 2014
Lambdas And Streams Hands On Lab, JavaOne 2014
 
Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8
 
I/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew KurniadiI/O Extended (GDG Bogor) - Andrew Kurniadi
I/O Extended (GDG Bogor) - Andrew Kurniadi
 
Java 8 and 9 in Anger
Java 8 and 9 in AngerJava 8 and 9 in Anger
Java 8 and 9 in Anger
 
What's New in Java SE 9
What's New in Java SE 9What's New in Java SE 9
What's New in Java SE 9
 
Java 9 Functionality and Tooling
Java 9 Functionality and ToolingJava 9 Functionality and Tooling
Java 9 Functionality and Tooling
 
Migrating to IntelliJ IDEA from Eclipse
Migrating to IntelliJ IDEA from EclipseMigrating to IntelliJ IDEA from Eclipse
Migrating to IntelliJ IDEA from Eclipse
 
Java 9 – The Ultimate Feature List
Java 9 – The Ultimate Feature ListJava 9 – The Ultimate Feature List
Java 9 – The Ultimate Feature List
 
New Features in JDK 8
New Features in JDK 8New Features in JDK 8
New Features in JDK 8
 
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
 

Similar a 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...Voxxed Days Thessaloniki
 
JDK 9 and JDK 10 Deep Dive
JDK 9 and JDK 10 Deep DiveJDK 9 and JDK 10 Deep Dive
JDK 9 and JDK 10 Deep DiveSimon Ritter
 
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 JavaC4Media
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java WorkshopSimon 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
 
JDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and BeyondJDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and BeyondSimon Ritter
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityDanHeidinga
 
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
 
Production Time Profiling Out of the Box
Production Time Profiling Out of the BoxProduction Time Profiling Out of the Box
Production Time Profiling Out of the BoxMarcus Hirt
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsDavid Delabassee
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best PracticesDavid Delabassee
 
Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)Nati Shalom
 

Similar a JDK 9: Big Changes To Make Java Smaller (20)

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...
 
JDK 9 Deep Dive
JDK 9 Deep DiveJDK 9 Deep Dive
JDK 9 Deep Dive
 
JDK 9 and JDK 10 Deep Dive
JDK 9 and JDK 10 Deep DiveJDK 9 and JDK 10 Deep Dive
JDK 9 and JDK 10 Deep Dive
 
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
 
Jigsaw modularity
Jigsaw modularityJigsaw modularity
Jigsaw modularity
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
 
Advanced modular development
Advanced modular development  Advanced modular development
Advanced modular development
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9
 
JDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and BeyondJDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and Beyond
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
 
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
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Production Time Profiling Out of the Box
Production Time Profiling Out of the BoxProduction Time Profiling Out of the Box
Production Time Profiling Out of the Box
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
Java modules
Java modulesJava modules
Java modules
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)
 
JVMs in Containers
JVMs in ContainersJVMs in Containers
JVMs in Containers
 

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
 
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
 
JDK 14 Lots of New Features
JDK 14 Lots of New FeaturesJDK 14 Lots of New Features
JDK 14 Lots of New FeaturesSimon Ritter
 
How to Choose a JDK
How to Choose a JDKHow to Choose a JDK
How to Choose a JDKSimon 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
 
Is Java Still Free?
Is Java Still Free?Is Java Still Free?
Is Java Still Free?Simon Ritter
 
Java Is Still Free
Java Is Still FreeJava Is Still Free
Java Is Still FreeSimon 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 (19)

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
 
JDK 14 Lots of New Features
JDK 14 Lots of New FeaturesJDK 14 Lots of New Features
JDK 14 Lots of New Features
 
Java after 8
Java after 8Java after 8
Java after 8
 
How to Choose a JDK
How to Choose a JDKHow to Choose a JDK
How to Choose a JDK
 
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
 
Is Java Still Free?
Is Java Still Free?Is Java Still Free?
Is Java Still Free?
 
Java Is Still Free
Java Is Still FreeJava Is Still Free
Java Is Still Free
 
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

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 

Último (20)

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 

JDK 9: Big Changes To Make Java Smaller

  • 1. © Copyright Azul Systems 2016 © Copyright Azul Systems 2015 @speakjava JDK 9: Big Changes To Make Java Smaller Simon Ritter Deputy CTO, Azul Systems 1
  • 2. © Copyright Azul Systems 2016 API Structural Changes
  • 3. © Copyright Azul Systems 2016 API Classification  Supported, intended for public use – JCP specified: java.*, javax.* – JDK specific: some com.sun.*, some jdk.*  Unsupported, not intended for public use – Mostly sun.* – Most infamous is sun.misc.Unsafe 3
  • 4. © Copyright Azul Systems 2016 General Java Compatability Policy  If an application uses only supported APIs on version N of Java it should work on version N+1, even without recompilation  Supported APIs can be removed –But only with advanced notice  JDK 8 has 18 interfaces, 23 classes, 64 fields, 358 methods and 20 constructors that have been deprecated –None have been removed –Until now 4
  • 5. © Copyright Azul Systems 2016 JDK 9: Incompatible Changes  Encapsulate most JDK internal APIs  Remove a small number of supported APIs – 6 in total, all add/remove PropertyChangeListener – Already flagged in JSR 337 (Java SE 8), JEP 162  Change the binary structure of the JRE and JDK  New version string format  A single underscore will no longer be allowed as an identifier in source code 5
  • 6. © Copyright Azul Systems 2016 Removed In JDK 9  Endorsed standard API override mechanism  Extension mechanism  No longer required now we have a module system 6
  • 7. © Copyright Azul Systems 2016 Most Popular Unsupported APIs 1. sun.misc.BASE64Encoder 2. sun.misc.Unsafe 3. sun.misc.BASE64Decoder 7 Oracle dataset based on internal application code
  • 8. © Copyright Azul Systems 2016 JDK Internal API Classification  Non-critical – Little or no use outside the JDK – Used only for convenience (alternatives exist)  Critical – Functionality that would be difficult, if not impossible to implement outside the JDK 8
  • 9. © Copyright Azul Systems 2016 JEP 260 Proposal  Encapsulate all non-critical JDK-internal APIs  Encapsulate all critical JDK-internal APIs, for which supported replacements exist in JDK 8  Do not encapsulate other critical JDK-internal APIs – Deprecate these in JDK 9 – Plan to encapsulate or remove them in JDK 10 – Provide command-line option to access encapsulated critical APIs 9
  • 10. © Copyright Azul Systems 2016 JEP 260 Accessible Critical APIs  sun.misc.Unsafe  sun.misc.Signal  sun.misc.SignalHandler  sun.misc.Cleaner  sun.reflect.Reflection.getCallerClass  sun.reflect.ReflectionFactory 10
  • 11. © Copyright Azul Systems 2016 Reviewing Your Own Code  jdeps tool – Introduced in JDK 8, improved in JDK 9 – Maven jdeps plugin jdeps –jdkinternals path/myapp.jar 11 path/myapp.jar -> /opt/jdk1.8.0/jre/lib/rt.jar <unnamed> (myapp.jar) -> sun.misc.Unsafe -> ...
  • 12. © Copyright Azul Systems 2016 Project Jigsaw And Modules
  • 13. © Copyright Azul Systems 2016 Goals For Project Jigsaw  Make Java SE more scalable and flexible – Internet of Things – Microservices  Improve security, maintainability and performance  Simplify construction, deployment and maintenance of large scale applications  Eliminate classpath hell 13
  • 14. © Copyright Azul Systems 2016 Module Fundamentals  Module is a grouping of code – For Java this is a collection of packages  Modules can contain other things – Native code – Resources – Configuration data 14 com.azul.zoop com.azul.zoop.alpha.Name com.azul.zoop.alpha.Position com.azul.zoop.beta.Animal com.azul.zoop.beta.Reptile com.azul.zoop.theta.Zoo com.azul.zoop.theta.Lake
  • 15. © Copyright Azul Systems 2016 Module Declaration 15 module com.azul.zoop { } module-info.java com/azul/zoop/alpha/Name.java com/azul/zoop/alpha/Position.java com/azul/zoop/beta/Animal.java com/azul/zoop/beta/Reptile.java com/azul/zoop/theta/Zoo.java com/azul/zoop/theta/Lake.java
  • 16. © Copyright Azul Systems 2016 Module Dependencies module com.azul.zoop { requires com.azul.zeta; } com.azul.zoop com.azul.zeta
  • 17. © Copyright Azul Systems 2016 Module Dependencies module com.azul.app { requires com.azul.zoop; requires java.sql; } com.azul.app com.azul.zoop java.sql
  • 18. © Copyright Azul Systems 2016 Module Dependency Graph com.azul.app java.base java.sqlcom.azul.zoop com.azul.zeta java.xml java.logging explicit implicit
  • 19. © Copyright Azul Systems 2016 Readability v. Dependency com.azul.app java.sql java.logging module java.sql { requires public java.logging; } Driver d = … Logger l = d.getParentLogger(); l.log(“azul’); Implied readability
  • 20. © Copyright Azul Systems 2016 Module Implied Readability Graph com.azul.app java.base java.sqlcom.azul.zoop com.azul.zeta java.xml java.logging explicit implicit implied
  • 21. © Copyright Azul Systems 2016 Package Visibility module com.azul.zoop { requires com.azul.zeta; exports com.azul.zoop.alpha; exports com.azul.zoop.beta to com.azul.app; } com.azul.zoop com.azul.zoop.alpha com.azul.zoop.beta com.azul.zoop.thetacom.azul.app only
  • 22. © Copyright Azul Systems 2016 More Package Visibility weak module com.azul.zoop { requires com.azul.zeta; } com.azul.zoop com.azul.zoop.alpha com.azul.zoop.beta com.azul.zoop.theta
  • 23. © Copyright Azul Systems 2016 Even More Package Visibility module com.azul.zoop { requires com.azul.zeta; exports com.azul.zoop.alpha; exports com.azul.zoop.beta to com.azul.app; exports private com.azul.theta; } com.azul.zoop com.azul.zoop.theta REFLECTIONGENERAL com.azul.zoop.alpha com.azul.zoop.beta com.azul.app only
  • 24. © Copyright Azul Systems 2016 Restricted Keywords module requires requires; exports exports; module { }
  • 25. © Copyright Azul Systems 2016 Accessibility  For a package to be visible – The package must be exported by the containing module – The containing module must be read by the using module  Public types from those packages can then be used com.azul.zoopcom.azul.app reads
  • 26. © Copyright Azul Systems 2016 Java Accessibility (pre-JDK 9) public protected <package> private
  • 27. © Copyright Azul Systems 2016 Java Accessibility (JDK 9) public to everyone public, but only to specific modules public only within a module protected <package> private public ≠ accessible (fundamental change to Java)
  • 28. © Copyright Azul Systems 2016 JDK 8 Dependencies
  • 29. © Copyright Azul Systems 2016 JDK 9 Platform Modules 29 java.se java.compact3 java.compact2 java.compact1 java.scripting java.instrument java.base java.logging java.sql java.sql.rowset java.xml java.desktop java.rmi java.prefs java.datatransfer java.compiler java.management java.security.jgss java.naming java.security.sasl All modules depend on java.base no implied readability=
  • 30. © Copyright Azul Systems 2016 JDK 9 Platform Modules 30 java.se.e e java.se java.xml.bind java.corba java.compiler java.desktop java.annotations.common java.rmi java.datatransfer java.management java.xml.ws java.naming java.transaction java.activation All modules depend on java.base
  • 31. © Copyright Azul Systems 2016 Using Modules
  • 32. © Copyright Azul Systems 2016 Module Path $ javac –modulepath dir1:dir2:dir3
  • 33. © Copyright Azul Systems 2016 Compilation With Module Path 33 $ javac –modulepath mods –d mods src/module-info.java src/com/azul/zoop/alpha/Name.java mods/module-info.class mods/com/azul/zoop/alpha/Name.class src/module-info.java src/com/azul/zoop/alpha/Name.java
  • 34. © Copyright Azul Systems 2016 Application Execution  -modulepath can be abbreviated to -mp $ java –mp mods –m com.azul.app/com.azul.app.Main Azul application initialised! module name main class
  • 35. © Copyright Azul Systems 2016 Packaging With Modular JAR Files mods/module-info.class mods/com/azul/app/Main.class $ jar --create --file mylib/app.jar --main-class com.azul.app.Main -C mods . module-info.class com/azul/app/Main.class app.jar
  • 36. © Copyright Azul Systems 2016 JAR Files & Module Information $ jar --file mylib/app.jar –p Name: com.azul.zoop Requires: com.azul.zeta java.base [MANDATED] java.sql Main class: com.azul.zoop.Main
  • 37. © Copyright Azul Systems 2016 Application Execution (JAR) $ java –mp mylib:mods –m com.azul.app Azul application initialised!
  • 38. © Copyright Azul Systems 2016 Linking Modular run-time image …confbin jlink $ jlink --modulepath $JDKMODS --addmods java.base –output myimage $ myimage/bin/java –listmods java.base@9.0
  • 39. © Copyright Azul Systems 2016 Linking An Application $ jlink --modulepath $JDKMODS:$MYMODS --addmods com.azul.app –output myimage $ myimage/bin/java –listmods java.base@9.0 java.logging@9.0 java.sql@9.0 java.xml@9.0 com.azul.app@1.0 com.azul.zoop@1.0 com.azul.zeta@1.0 Version numbering for information purposes only “It is not a goal of the module system to solve the version- selection problem”
  • 40. © Copyright Azul Systems 2016 Application Migration
  • 41. © Copyright Azul Systems 2016 Typical Application (JDK 8) jar jar jar JDK jar jarjar jar jar jar jar jar jar Classpath
  • 42. © Copyright Azul Systems 2016 Typical Application (JDK 9) jar jar jar module java.base module java.desktop module java.datatransfer module java.xml jar jarjar jar jar jar jar jar jar Unnamed module
  • 43. © Copyright Azul Systems 2016 Sample Application myapp.ja r libgl.jar mylib.jar gluegen.jar jogl.jar module java.base module java.desktop module java.datatransfer module java.xml
  • 44. © Copyright Azul Systems 2016 Run Application With Classpath $ java –classpath lib/myapp.jar: lib/mylib.jar: lib/libgl.jar: lib/gluegen.jar: lib/jogl.jar: myapp.Main
  • 45. © Copyright Azul Systems 2016 Sample Application module myapp.ja r libgl.jar module mylib.jar gluegen.jar jogl.jar module java.base module java.desktop module java.datatransfer module java.xml
  • 46. © Copyright Azul Systems 2016 Application module-info.java module myapp { requires mylib; requires java.base; requires java.sql; requires libgl; ???? requires gluegen; ???? requires jogl; ???? }
  • 47. © Copyright Azul Systems 2016 Sample Application module myapp.ja r module libgl.jar module mylib.jar module gluegen.jar module jogl.jar module java.base module java.desktop module java.datatransfer module java.xml
  • 48. © Copyright Azul Systems 2016 Automatic Modules  Real modules  Simply place unmodified jar file on module path – Rather than classpath  No changes to JAR file  Module name derived from JAR file name  Exports all its packages – No selectivity  Automatically requires all modules on the module path 48
  • 49. © Copyright Azul Systems 2016 Application Module Dependencies module myapp.ja r module libgl.jar module mylib.jar module gluegen.jar module jogl.jar module java.base module java.desktop module java.datatransfer module java.xml Implicit Explicit
  • 50. © Copyright Azul Systems 2016 Run Application With Modules $ java –classpath lib/myapp.jar: lib/mylib.jar: lib/libgl.jar: lib/gluegen.jar: lib/jogl.jar: myapp.Main $ java –mp mylib:lib –m myapp
  • 51. © Copyright Azul Systems 2016 Advanced Details
  • 52. © Copyright Azul Systems 2016 Modular Jar Files And JMODs  Modular jar files are simple – Standard jar file possibly with module-info.class file – Can use existing (unmodified) jar files  JMOD files – More complex module files – Used for modules in the JDK – Can include native files (JNI), configuration files and other data – Based on zip file format (pending final details - JEP 261) 52
  • 53. © Copyright Azul Systems 2016 jmod Command  Create can specify several details: – Main class – Native libraries and commands – Configuration data – OS name, version and machine architecture  Details included in module-info.class file 53 jmod (create | list | describe) <options> <jmod-file>
  • 54. © Copyright Azul Systems 2016 Classloaders (Since JDK 1.2) 54 Bootstrap classloader (Internal Class) Bootstrap Class Path Extension classloader (URLClassLoader) Extension Mechanism Application classloader (URLClassLoader) Class Path
  • 55. © Copyright Azul Systems 2016 Classloaders (JDK 9) 55 Bootstrap classloader (Internal Class) bootstrap class path Platform classloader (Internal Class) JDK classes with specific permissions Application classloader (Internal Class) Class & Module Path
  • 56. © Copyright Azul Systems 2016 Summary
  • 57. © Copyright Azul Systems 2016 Tooling Support  NetBeans leads the way  Early Access NetBeans 9 available  Support for module-info.java file – Graphing of dependencies 57
  • 58. © Copyright Azul Systems 2016 Summary  Modularisation is a big change for Java – JVM/JRE rather than language/APIs  Potentially disruptive changes to exposure of non-public APIs – Is it safe?  Developing modular code will require some learning – Not a huge change, though 58
  • 59. © Copyright Azul Systems 2016 Zulu.org  Azul binary distribution of OpenJDK source code  Passed all TCK tests  Completely FREE! – Pay us if you’d like enterprise level support  Just announced: Embedded Zulu support for ARM 32-bit – Intel already supported – “Requires no licensing fee” 59
  • 60. © Copyright Azul Systems 2016 Further Information  openjdk.java.net  openjdk.java.net/jeps  openjdk.java.net/projects/jigsaw  jcp.org 60
  • 61. © Copyright Azul Systems 2016 © Copyright Azul Systems 2015 @speakjava Questions Simon Ritter Deputy CTO, Azul Systems 61

Notas del editor

  1. com.sun API examples mostly around tooling jdk API example is nashorn
  2. Pack200, LogManager
  3. Signal/SignalHandler (handling OS level signals SIGIINT) Cleaner - more flexible alternative to class finalisation Reflection - which classes are in the call stack