59
© Copyright Azul Systems 2016 © Copyright Azul Systems 2015 @speakjava azul.com Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter Deputy CTO, Azul Systems 1

Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

  • Upload
    others

  • View
    23

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

© Copyright Azul Systems 2015

@speakjava azul.com

Project Jigsaw in JDK 9: Modularity Comes To Java

Simon Ritter Deputy CTO, Azul Systems

1

Page 2: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Agenda § API structure changes §  Introduction to Jigsaw § Developing code with modules § Application migration § Advanced stuff § Summary & Further Information

2

Page 3: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

API Structure Changes

Page 4: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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

4

Page 5: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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

§ To date 23 classes, 18 interfaces and 379 methods have been deprecated

– None have been removed

5

Page 6: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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

6

Page 7: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Removed In JDK 9 § Endorsed standard API override mechanism § Extension mechanism

§ No longer required now we have a module system

7

Page 8: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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

Page 9: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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

Page 10: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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

Page 11: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Reviewing Your Own Code §  jdeps tool

– Introduced in JDK 8, improved in JDK 9 – Maven jdeps plugin

jdeps–jdkinternalspath/myapp.jar

11

path/myapp.jar->/opt/jdk1.8.0/jre/lib/rt.jar<unnamed>(myapp.jar)->java.awt->java.awt.event->java.beans->java.io...

Page 12: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Introduction To Jigsaw And Modules

Page 13: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Goals For Project Jigsaw §  Make Java SE more scalable and flexible

–  IoT devices need more compact Java runtimes §  Improve security, maintainability and performance

§  Simplify construction, deployment and maintenance of large scale applications

§  Eliminate classpath hell

13

Page 14: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Module Fundamentals § Module is a grouping of code

– For Java this is a collection of packages § The module 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.Zoo

Page 15: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Module Declaration

15

modulecom.azul.zoop{}

module-info.javacom/azul/zoop/alpha/Name.javacom/azul/zoop/alpha/Position.javacom/azul/zoop/beta/Animal.javacom/azul/zoop/beta/Zoo.java

Page 16: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Module Dependencies

modulecom.azul.zoop{requirescom.azul.zeta;} com.azul.zoop

com.azul.zeta

Page 17: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Module Dependencies

modulecom.azul.app{requirescom.azul.zooprequiresjava.sql}

com.azul.app

com.azul.zoop java.sql

Page 18: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Module Dependency Graph com.azul.app

java.base

java.sql com.azul.zoop

com.azul.zeta java.xml java.logging

explicit implicit

Page 19: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Readability v. Dependency

com.azul.app

java.sql

java.logging

modulejava.sql{requirespublicjava.logging;}

Driverd=…Loggerl=d.getParentLogger();l.log(“azul’);

Implied readability

Page 20: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Module Implied Readability Graph com.azul.app

java.base

java.sql com.azul.zoop

com.azul.zeta java.xml java.logging

explicit implicit implied

Page 21: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Package Visibility

modulecom.azul.zoop{requirescom.azul.zeta;exportscom.azul.zoop.alpha;exportscom.azul.zoop.beta;}

com.azul.zoop

com.azul.zoop.alphacom.azul.zoop.beta com.azul.zoop.theta

Page 22: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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.zoop com.azul.app

reads

Page 23: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Java Accessibility (pre-JDK 9)

publicprotected<package>private

Page 24: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Java Accessibility (JDK 9)

publictoeveryonepublic,butonlytospecificmodulespubliconlywithinamoduleprotected<package>private

public ≠ accessible (fundamental change to Java)

Page 25: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

JDK 8 Dependencies

Page 26: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

JDK 9 Platform Modules

26

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

Page 27: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

JDK 9 Platform Modules

27

java.se.ee 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

Page 28: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Developing Code With Modules

Page 29: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Compilation

29

$javac–dmods\src/zeta/module-info.java\src/zeta/com/azul/zeta/Vehicle.java

mods/zeta/module-info.classmods/zeta/com/azul/zeta/Vehicle.class

src/zeta/module-info.javasrc/zeta/com/azul/zeta/Vehicle.java

Page 30: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Module Path

$javac–modulepathdir1:dir2:dir3

Page 31: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Compilation With Module Path

31

$javac–modulepathmods–dmods\src/zoop/module-info.java\src/zoop/com/azul/zoop/alpha/Name.java

mods/zoop/module-info.classmods/zoop/com/azul/zoop/alpha/Name.class

src/zoop/module-info.javasrc/zoop/com/azul/zoop/alpha/Name.java

Page 32: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Application Execution

§ -modulepath can be abbreviated to -mp

$java–mpmods–mcom.azul.app/com.azul.app.MainAzulapplicationinitialised!

module name main class

Page 33: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Packaging With Modular JAR Files mods/zoop/module-info.classmods/zoop/com/azul/app/Main.class

$jar--create--filemylib/app.jar\--main-classcom.azul.app.Main\-Cmods.

module-info.classcom/azul/app/Main.class

app.jar

Page 34: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

JAR Files & Module Information

$jar--filemylib/app.jar–pName:com.azul.zoopRequires:com.azul.zetajava.base[MANDATED]java.sqlMainclass:com.azul.zoop.Main

Page 35: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Application Execution (JAR)

$java–mpmylib:mods–mcom.azul.appAzulapplicationinitialised!

Page 36: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Linking Modular run-time

image

… conf bin

jlink

$jlink--modulepath$JDKMODS\--addmodsjava.base–outputmyimage$myimage/bin/java–[email protected]

Page 37: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Linking An Application

$jlink--modulepath$JDKMODS:$MYMODS\--addmodscom.azul.app–outputmyimage$myimage/bin/java–[email protected]@[email protected]@[email protected]@[email protected]

Version numbering for information purposes only “It is not a goal of the module system to solve the version-

selection problem”

Page 38: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Application Migration

Page 39: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Typical Application (JDK 8)

jar jar

jar

JDK

jar

jar jar jar jar

jar jar

jar

jar

Cla

sspa

th

Page 40: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Typical Application (JDK 9)

jar jar

jar

module java.base

module java.desktop

module java.datatransfer

module java.xml

jar

jar jar jar jar

jar jar

jar

jar

Unnamed module

Page 41: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Sample Application myapp.jar

lwjgl.jar

mylib.jar

gluegen-rt.jar jogl-all.jar

module java.base

module java.desktop

module java.datatransfer

module java.xml

Page 42: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Run Application With Classpath

$java–classpath\lib/myapp.jar:\lib/mylib.jar:\lib/liblwjgl.jar:\lib/gluegen-rt.jar:\lib/jogl-all.jar:\myapp.Main

Page 43: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Sample Application module

myapp.jar

lwjgl.jar

module mylib.jar

gluegen-rt.jar jogl-all.jar

module java.base

module java.desktop

module java.datatransfer

module java.xml

Page 44: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Application module-info.java

modulemyapp{requiresmylib;requiresjava.base;requiresjava.sql;requireslwjgl;????requiresgluegen-rt;????requiresjogl-all;????}

Page 45: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Sample Application module

myapp.jar

module lwjgl.jar

module mylib.jar

module gluegen-rt.jar

module jogl-all.jar

module java.base

module java.desktop

module java.datatransfer

module java.xml

Page 46: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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

46

Page 47: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Application Module Dependencies module

myapp.jar

module lwjgl.jar

module mylib.jar

module gluegen-rt.jar

module jogl-all.jar

module java.base

module java.desktop

module java.datatransfer

module java.xml

Implicit Explicit

Page 48: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Run Application With Modules

$java–classpath\lib/myapp.jar:\lib/mylib.jar:\lib/liblwjgl.jar:\lib/gluegen-rt.jar:\lib/jogl-all.jar:\myapp.Main$java–mpmylib:lib–mmyapp

Page 49: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Advanced Stuff

Page 50: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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)

50

Page 51: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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

51

jmod(create|list|describe)<options><jmod-file>

Page 52: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Classloaders (Since JDK 1.2)

52

Bootstrap classloader (Internal Class) Bootstrap Class Path

Extension classloader (URLClassLoader) Extension Mechanism

Application classloader (URLClassLoader) Class Path

Page 53: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Classloaders (JDK 9)

53

Bootstrap classloader (Internal Class) bootstrap class path

Platform classloader (Internal Class) JDK classes with specific permissions

Application classloader (Internal Class) Class & Module Path

Page 54: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Summary & Further Information

Page 55: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Tooling Support § NetBeans leads the way § Early Access NetBeans 9 available § Support for module-info.java file

– Graphing of dependencies

55

Page 56: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

NetBeans Tooling

56

Page 57: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© 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

57

Page 58: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

Further Information § openjdk.java.net § openjdk.java.net/jeps § openjdk.java.net/projects/jigsaw §  jcp.org

§ www.zulu.org

58

Page 59: Project Jigsaw in JDK 9: Modularity Comes To Java · Project Jigsaw in JDK 9: Modularity Comes To Java Simon Ritter ... Goals For Project Jigsaw § Make Java SE more scalable and

© Copyright Azul Systems 2016

© Copyright Azul Systems 2015

@speakjava azul.com

Questions

Simon Ritter Deputy CTO, Azul Systems

59