SlideShare a Scribd company logo
An overview of
Project Jigsaw
src/main/java
api/Foo.java
internal/Qux.java
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>foo</artifactId>
<version>1</version>
</project>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>bar</artifactId>
<version>1</version>
</project>
src/main/java
api/Bar.java
internal/Baz.java
pom.xml pom.xml
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>bar</artifactId>
<version>1</version>
<dependencies>
<dependency>
<groupId>example</groupId>
<artifactId>foo</artifactId>
<version>1</version>
</dependency>
</dependencies>
</project>
module-info.java example.foo
api/Foo.java
internal/Qux.java
module-info.java example.bar
api/Bar.java
internal/Baz.java
module example.foo {
exports api;
}
module example.bar {
requires example.foo;
}
Scope
Task module descriptor
module descriptor
deployment descriptor
build execution descriptor
API for custom tasks
runtime
compile-time
build-time
Enforcement
obligatory
(with opt-out)
optional
(provided/optional dependency)
Unit Java package (sub-)project
api/Foo.class internal/Qux.class api/Bar.class internal/Baz.class
api/Foo.class internal/Qux.class api/Bar.class internal/Baz.class
class path (system class loader)
Modularity prior to Java 9 is emulated by class loader hierarchies. By tweaking class
loaders to define multiple parents, it is also possible to run several versions of the
same module (e.g. OSGi).
api/Foo.class internal/Qux.class api/Bar.class internal/Baz.class
api/Foo.class internal/Qux.class api/Bar.class internal/Baz.class
module loader
example.foo
example.bar
“example.bar reads example.foo”
The integrity of the module graph is verified by the Java 9 runtime. Jars without a
module-info.class are bundled in an unnamed module that reads all modules (fallback).
try {
Class<?> pluginType = Class.forName("example.Foo");
runAppWithPlugin(pluginType);
} catch(ClassNotFoundException exception) {
runAppWithoutPlugin();
}
void runAppWithPlugin(Class<?> pluginType) {
activate(pluginType.newInstance());
// and run the app...
}
When code is bundled as a module, looking up a class is still possible but any
execution of foreign code is no longer permitted.
In order to overcome this, a new reflection API for modules is introduced that allows
for the dynamic attachment of “read edges” at runtime. At compile time, the current
draft does however not foresee a possibility of defining optional dependencies.
module example.overview {
exports pkg.name;
exports pkg.other.name to example.friend, example.other;
requires mdl.name;
requires public mdl.name.exposed;
provides service.type.name with service.impl.name;
uses service.other.type.name;
}
Jigsaw recommends crossing of module boundaries by using service interfaces.
Implementations of such interfaces can then be retreived by the ServiceLoader API.
Finally, modules can – similarly to class loaders – be organized in layers. This allows
The migration of class loader hierarchy systems into a modularized formats. Layers
can be created programmatically via a reflection API.
An Overview of Project Jigsaw
An Overview of Project Jigsaw
Java 9: more than Jigsaw! (biased selection)
• New process API
• HTTP2 client
• Improved contended locking
• Unified JVM logging
• Compiler control
• Variable handles
• Segmented code cache
• Smart Java compilation, phase 2
• Project Coin extensions
(private interface methods)
• Unicode 7.0/8.0
• Convenience collection factories
• Annotation pipeline enhancements
• Multi-version jar files
• Compact strings
• “Indifying” string concatenation
• Stack-walking API
• Currency and money API
• Enhanced method handles
• Platform specific desktop features
• javac performance (sjavac, type inference)
• Jshell
• javadoc improvements (HTML5, search)
• Improved concurrency
http://rafael.codes
@rafaelcodes
http://documents4j.com
https://github.com/documents4j/documents4j
http://bytebuddy.net
https://github.com/raphw/byte-buddy

More Related Content

PPTX
Monitoring distributed (micro-)services
Rafael Winterhalter
 
PDF
Bytecode manipulation with Javassist and ASM
ashleypuls
 
PPTX
The definitive guide to java agents
Rafael Winterhalter
 
PPTX
Getting started with Java 9 modules
Rafael Winterhalter
 
PPTX
Java and OpenJDK: disecting the ecosystem
Rafael Winterhalter
 
KEY
JavaOne 2011 - JVM Bytecode for Dummies
Charles Nutter
 
PPTX
Making Java more dynamic: runtime code generation for the JVM
Rafael Winterhalter
 
PPTX
Mastering Java Bytecode With ASM - 33rd degree, 2012
Anton Arhipov
 
Monitoring distributed (micro-)services
Rafael Winterhalter
 
Bytecode manipulation with Javassist and ASM
ashleypuls
 
The definitive guide to java agents
Rafael Winterhalter
 
Getting started with Java 9 modules
Rafael Winterhalter
 
Java and OpenJDK: disecting the ecosystem
Rafael Winterhalter
 
JavaOne 2011 - JVM Bytecode for Dummies
Charles Nutter
 
Making Java more dynamic: runtime code generation for the JVM
Rafael Winterhalter
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Anton Arhipov
 

What's hot (20)

PPTX
Java 10, Java 11 and beyond
Rafael Winterhalter
 
PDF
JVM Mechanics: When Does the JVM JIT & Deoptimize?
Doug Hawkins
 
PDF
Modern Programming in Java 8 - Lambdas, Streams and Date Time API
Ganesh Samarthyam
 
PPT
55 New Features in Java 7
Boulder Java User's Group
 
PPT
Building a java tracer
rahulrevo
 
PPT
比XML更好用的Java Annotation
javatwo2011
 
PDF
Productive Programming in Java 8 - with Lambdas and Streams
Ganesh Samarthyam
 
PPTX
Java Bytecode For Discriminating Developers - GeeCON 2011
Anton Arhipov
 
PDF
Smart Migration to JDK 8
Geertjan Wielenga
 
PPTX
Java concurrency questions and answers
CodeOps Technologies LLP
 
PDF
Java Programming - 01 intro to java
Danairat Thanabodithammachari
 
PPTX
Mastering Java Bytecode - JAX.de 2012
Anton Arhipov
 
ODP
From Java 6 to Java 7 reference
Giacomo Veneri
 
PPTX
Jersey framework
knight1128
 
PDF
Introduction to OSGi (Tokyo JUG)
njbartlett
 
PDF
Deep Dive Java 17 Devoxx UK
José Paumard
 
PPTX
Jdk 7 4-forkjoin
knight1128
 
PDF
Invokedynamic / JSR-292
ytoshima
 
PPT
Hibernate
Sunil OS
 
Java 10, Java 11 and beyond
Rafael Winterhalter
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
Doug Hawkins
 
Modern Programming in Java 8 - Lambdas, Streams and Date Time API
Ganesh Samarthyam
 
55 New Features in Java 7
Boulder Java User's Group
 
Building a java tracer
rahulrevo
 
比XML更好用的Java Annotation
javatwo2011
 
Productive Programming in Java 8 - with Lambdas and Streams
Ganesh Samarthyam
 
Java Bytecode For Discriminating Developers - GeeCON 2011
Anton Arhipov
 
Smart Migration to JDK 8
Geertjan Wielenga
 
Java concurrency questions and answers
CodeOps Technologies LLP
 
Java Programming - 01 intro to java
Danairat Thanabodithammachari
 
Mastering Java Bytecode - JAX.de 2012
Anton Arhipov
 
From Java 6 to Java 7 reference
Giacomo Veneri
 
Jersey framework
knight1128
 
Introduction to OSGi (Tokyo JUG)
njbartlett
 
Deep Dive Java 17 Devoxx UK
José Paumard
 
Jdk 7 4-forkjoin
knight1128
 
Invokedynamic / JSR-292
ytoshima
 
Hibernate
Sunil OS
 
Ad

Similar to An Overview of Project Jigsaw (20)

PPTX
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Mihail Stoynov
 
PPTX
Modular Java
Martin Toshev
 
PPTX
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Martin Toshev
 
PPTX
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Martin Toshev
 
PDF
OpenJDK Penrose Presentation (JavaOne 2012)
David Bosschaert
 
PDF
Jigsaw what the Heck Happens Now - N Bartlett
mfrancis
 
PDF
Java modularity: life after Java 9
Sander Mak (@Sander_Mak)
 
PPTX
Java 9 Modularity and Project Jigsaw
Comsysto Reply GmbH
 
PDF
Jigsaw - Javaforum 2015Q4
Rikard Thulin
 
PDF
Java SE 9 modules (JPMS) - an introduction
Stephen Colebourne
 
PDF
Java 9 Modularity in Action
Sander Mak (@Sander_Mak)
 
PDF
Java 7 Modularity: a View from the Gallery
njbartlett
 
PPTX
Java modules using project jigsaw@jdk 9
Mauricio "Maltron" Leal
 
PDF
Java SE 9 modules - an introduction (July 2018)
Stephen Colebourne
 
PDF
Modules all the way down: OSGi and the Java Platform Module System
Tim Ellison
 
PPTX
Modularization With Project Jigsaw in JDK 9
Simon Ritter
 
PDF
Java >= 9
Benjamin Pack
 
PDF
Java 9 and Beyond
Mayank Patel
 
PDF
What we can expect from Java 9 by Ivan Krylov
J On The Beach
 
PDF
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
JAX London
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Mihail Stoynov
 
Modular Java
Martin Toshev
 
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Martin Toshev
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Martin Toshev
 
OpenJDK Penrose Presentation (JavaOne 2012)
David Bosschaert
 
Jigsaw what the Heck Happens Now - N Bartlett
mfrancis
 
Java modularity: life after Java 9
Sander Mak (@Sander_Mak)
 
Java 9 Modularity and Project Jigsaw
Comsysto Reply GmbH
 
Jigsaw - Javaforum 2015Q4
Rikard Thulin
 
Java SE 9 modules (JPMS) - an introduction
Stephen Colebourne
 
Java 9 Modularity in Action
Sander Mak (@Sander_Mak)
 
Java 7 Modularity: a View from the Gallery
njbartlett
 
Java modules using project jigsaw@jdk 9
Mauricio "Maltron" Leal
 
Java SE 9 modules - an introduction (July 2018)
Stephen Colebourne
 
Modules all the way down: OSGi and the Java Platform Module System
Tim Ellison
 
Modularization With Project Jigsaw in JDK 9
Simon Ritter
 
Java >= 9
Benjamin Pack
 
Java 9 and Beyond
Mayank Patel
 
What we can expect from Java 9 by Ivan Krylov
J On The Beach
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
JAX London
 
Ad

More from Rafael Winterhalter (10)

PPTX
Byte code field report
Rafael Winterhalter
 
PPTX
Event-Sourcing Microservices on the JVM
Rafael Winterhalter
 
PPTX
Code generation for alternative languages
Rafael Winterhalter
 
PPTX
Migrating to JUnit 5
Rafael Winterhalter
 
PPTX
The Java memory model made easy
Rafael Winterhalter
 
PPTX
An introduction to JVM performance
Rafael Winterhalter
 
PPTX
Java byte code in practice
Rafael Winterhalter
 
PPTX
Unit testing concurrent code
Rafael Winterhalter
 
PPTX
Understanding Java byte code and the class file format
Rafael Winterhalter
 
PPTX
A topology of memory leaks on the JVM
Rafael Winterhalter
 
Byte code field report
Rafael Winterhalter
 
Event-Sourcing Microservices on the JVM
Rafael Winterhalter
 
Code generation for alternative languages
Rafael Winterhalter
 
Migrating to JUnit 5
Rafael Winterhalter
 
The Java memory model made easy
Rafael Winterhalter
 
An introduction to JVM performance
Rafael Winterhalter
 
Java byte code in practice
Rafael Winterhalter
 
Unit testing concurrent code
Rafael Winterhalter
 
Understanding Java byte code and the class file format
Rafael Winterhalter
 
A topology of memory leaks on the JVM
Rafael Winterhalter
 

Recently uploaded (20)

PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Software Development Methodologies in 2025
KodekX
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 

An Overview of Project Jigsaw