Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Preparing for Java 9
Modules
Ryan Cuprak
About
Twitter: @ctjava
Email: rcuprak@gmail.com / r5k@3ds.com
Blog: cuprak.info
Linkedin: www.linkedin.com/in/rcuprak
Project Jigsaw Goals
• Make the Java platform scalable for small computing
devices.
• Improve platform security and maintainability
• Enable improved application performance
• Simplify library creation and application development
Reliable configuration
Strong Encapsulation
Why Modules?
• Java currently suffers from JAR ”hell”
• Maven tracks dependencies but no runtime enforcement
• No guarantee an application can start:
NoClassDefFoundError
• Possible to mix library versions on classpath:
• commons-io-2.5 and commons-io-1.6 – what happens?
• Existing module frameworks (OSGi) can’t be used to
modularize the Java platform.
Project Jigsaw Pieces
• JEPs
• 200: Modular JDK
• 201: Modular Source Code
• 220: Modular Run-time Images
• 260: Encapsulate Most Internal APIs
• 261: Module System
• 282: jlink: Java Linker
• JSR 376 Java Platform Module System
Project Jigsaw
• Target Release Date: July 27th now September 21st 2017
You now have time!
Comparing Jigsaw / OSGi / Java EE
Feature Jigsaw OSGi Java EE
Allows cycles between packages in different modules ❌ ✅ ✅
Isolated package namespaces ❌ ✅ ✅
Allows lazy loading ❌ ✅ ✅
Allows dynamic package addition ❌ ✅ ✅
Unrestricted naming ❌ ❌ ✅
Allows multiple versions of an artifact* ❌ ✅ ✅
Allows split packages ❌ ✅ ✅
Allows textual descriptor ❌ ✅ ✅
Source: https://goo.gl/7RKqQx
Class Loading & Module System
Bootstrap Loader Platform Loader Application Loader
Java Platform Module System
Java Virtual Machine
java.base java.logging java.sql java.corba jdk.compiler log4j
Common Questions
• Do I have to modularize my application to run on Java 9?
• Will my Java 6/7/8 application compile on Java 9?
• Will my Java 6/7/8 application run un-modified on Java 9?
• How do I identify problems today?
- NO -
- Depends – using private APIs? -
- Depends – using private APIs? -
- jdeps -
Common Questions…
• Can I partially leverage modules?
• Is tooling ready? (Maven/Gradle/IntelliJ/NetBeans/etc.)
• Do application containers work on 9 today?
• Can I try out Java 9 today?
- YES -
- Absolutely NOT -
- Maybe -
- YES -
JEP 200: Modular JDK
JDK is fully modularized!
jdeps
• Command line tool included with Java 8
• Static class dependency checker
• Key parameters
• -jdkinternals – flags internal API usage that will break in Java 9
• -dotoutput <dir> - dot output files
• -cp – classpath to analyze
• -verbose:class/package – package/class level dependencies
• Use jdeps on all generated output and dependencies
jdeps – Example
jdeps -jdkinternals jide-common.jar
jide-common.jar -> /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/rt.jar
com.jidesoft.plaf.aqua.AquaJidePopupMenuUI (jide-common.jar)
-> com.apple.laf.AquaPopupMenuUI JDK internal API (rt.jar)
com.jidesoft.plaf.aqua.AquaRangeSliderUI (jide-common.jar)
-> apple.laf.JRSUIConstants JDK internal API (rt.jar)
-> apple.laf.JRSUIConstants$Orientation JDK internal API (rt.jar)
-> apple.laf.JRSUIConstants$State JDK internal API (rt.jar)
-> com.apple.laf.AquaSliderUI JDK internal API (rt.jar)
com.jidesoft.plaf.basic.BasicFolderChooserUI (jide-common.jar)
-> sun.awt.shell.ShellFolder JDK internal API (rt.jar)
com.jidesoft.plaf.basic.BasicPainter (jide-common.jar)
-> sun.swing.plaf.synth.SynthIcon JDK internal API (rt.jar)
com.jidesoft.plaf.metal.MetalUtils$GradientPainter (jide-common.jar)
-> sun.swing.CachedPainter JDK internal API (rt.jar)
com.jidesoft.plaf.windows.AnimationController (jide-common.jar)
-> sun.awt.AppContext JDK internal API (rt.jar)
-> sun.security.action.GetBooleanAction JDK internal API (rt.jar)
…
JIDE: Widely used
Swing component
library (jidesoft.com)
jdeps – Fixing/Alternatives
https://goo.gl/fxzKwP
jdeps: Build Integration
Maven JDeps Plugin: https://goo.gl/thr88W
Goals:
• jdeps:jdkinternals
• jdeps:test-jdkinternals
MODULE BASICS
Java Visibility Today
How do you hide the implementation class?
Java Accessibility
JDK 1-8 JDK 9+
public public
protected public to specific modules
<package> public only within a module
private protected
<package>
private
Module Definition
• module-info.java defines a module
• Contents define the following:
• Unique name of the module
• Dependencies of the module
• Packages to be exported for use by other modules
• Placed at root of the namespace
Module Name
exports
requires
Module Definition
<open> module <module-name> {
[export <java package> [to <module name>]
[requires [transitive] <module-name>]
[opens <module name> [to <module name]]
[provides <interface> with <implementation>]
[uses <interface>]
}
Module Basics
• Module names must be unique
• Names should follow reverse domain name pattern
• Modules are eagerly loaded
• Dependency graph is built and checked on startup
• Application won’t start if modules are missing
• No support for versioning
• Only one version of a module may be loaded
• Layers maybe used to load different versions of a module
About Versioning…
• Two modules with the same package names in them are
considered to be different versions of the same module.
• Two modules with the same name are considered to be
two versions of the same module.
• Concealed package conflicts:
• When two modules have the same package name in them, but the
package is private in both modules, the module system cannot load
both modules into the same layer
Introducing the Module Path
• Module path augments / extends the classpath
• All command line tools now include both
--module-path
--upgrade-module-path
--add-modules
--describe-module
--dry-run
--validate-modules
• Use java –list-modules to see all available modules
Parameters on java command
JDK Modules
• jdk.base is included by default.
• java.se and java.se.ee are aggregator modules
• java.se.ee contains the following modules:
• java.corba
• java.transaction
• java.xml.ws.annotation
• javax.xml.ws
• java.xml.bind
• java.activation
• java runs with java.se modules – not java.se.ee
Dependency Cycles
java.base
org.ctjava.model org.ctjava.util
Dependency Cycles
org.ctjava.admin
org.ctjava.model org.ctjava.util
Simple Module Example
javac -d out src/org/ctjava/services/MeetingService.java
src/org/ctjava/services/impl/MeetingServiceImpl.java src/module-info.java
Cannot use reflection to find
MeetingServiceImpl
Simple Module Example…
Compiler Output:
Module Definition
Multiple Modules
Compiling
javac -d out --module-source-path src
$(find . -name "*.java")
Module
Module
Directory containing module uses module name.
Names must match or compiler error.
Packaging
jar --create --file=org.ctjava.model@1.0.jar
--module-version=1.0 -C out/org.ctjava.model .
jar --create --file=org.ctjava.service@1.0.jar
--module-version=1.0 -C out/org.ctjava.service .
Note: Module version isn’t used for module
resolution. It is recorded in module-info.class.
Transitive Dependencies
Transitive Dependencies…
Qualified Exports
Admin utility uses a JavaFX UI
Qualified Exports…
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:946)
Caused by: java.lang.RuntimeException: Unable to construct Application instance: class org.ctjava.admin.AdminConsole
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:963)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:198)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.IllegalAccessException:
class com.sun.javafx.application.LauncherImpl (in module javafx.graphics) cannot access class
org.ctjava.admin.AdminConsole (in module org.ctjava.admin) because module org.ctjava.admin does not export
org.ctjava.admin to module javafx.graphics
• JavaFX LauncherImpl cannot access AdminConsole
• Class in javafx.graphics tried to instantiate AdminConsole in
org.ctjava.admin
Qualified Exports
jlink
• Generates a runtime-image including
the JVM.
• Only required modules are included
• Basic invocation:
jlink --module-path <modulepath>
--add-modules <modules>
--limit-modules <modules>
--output <path>
Demo used
JavaFX: 95 mb
Full JDK: 454 mb
DIGGING DEEPER
Deprecated Modules
Code compiled using Java 8:
Deprecated Modules…
java -jar WebEndpointTest.jar
Worked on Java 8 – what happened?
Fix:
java --add-modules java.xml.ws -jar WebEndpointTest.jar
Module Types
Automatic Modules • Mechanism for using JARs which do not
include a module-info.java configuration
• Export all of the JAR packages
• Reads all other modules
• Module name is dynamically generated
Unamed Module • Alls JARs and classes on the classpath will
be contained un the Unamed Module.
• Similar to Automatic Modules
• Does not possess a name
Platform Modules • JDK modules
JARs & Module System
--module-path -classpath
Modular JAR Application Module Unnamed Module
Non-modular JAR Automatic Module Unnamed Module
Unnamed module name: ALL-UNNAMED
Readability
Module Type Origin Export
Packages
Read Modules
Named Platform Provided by platform Explicitly
Named Application All JARS containing
module-info on the
module path
Explicitly • Platform
• Application
• Automatic
Automatic All JARs without module-
info but on module path
All • Platform
• Application
• Automatic
• Unnamed
Unnamed Classpath All • Platform
• Automatic
• Application
Automatic Modules
Automatic Modules…
Code in MyInvocationLibrary:
Code in org.ctjava.admin – module:
Automatic Modules…
java.lang.IllegalAccessException: class org.ctjava.util.InstantiateUtility (in module MyInvocationLibrary) cannot
access class org.ctjava.admin.AdminCallback (in module org.ctjava.admin) because module org.ctjava.admin
does not export org.ctjava.admin to module MyInvocationLibrary
Escape & Encapsulation Kill Switch
Important javac command line options:
--add-opens – opens a package
--permit-illegal-access - All code in the unnamed module
can access other types regardless of any limitations.
Will result in a WARNING: to be removed
in Java 10.
SERVICES
Services
• API first added in Java 6
• Rarely used outside of JDK
• Enhanced/altered for Jigsaw
Services Example
Defining Service API
Service Implementation
Service in Action
JAVA 9 TOOLING
June 2017 Status
Tooling Support
• Early access JDK 9 builds:
http://jdk.java.net/9/
• Use jenv to swich between Java 8 & 9
http://www.jenv.io/
Examples:
jenv local 9-ea (locally switch to Java 9)
jevn global 1.8 (globally use Java 8)
Note: rt.jar and tools.jar were removed.
Tooling Support
Tool Status
NetBeans 9 🔶 Developer Preview
IntelliJ 2017.1 ✅
Eclipse 🔶
Maven ❌
Gradle ❌
• Maven & Gradle do not generate module-info.java.
• Gradle 3.4 doesn’t work on Java 9
• Maven 3.5 doesn’t completely work (not all plugins compatible)
• Eclipse Neon won’t start with Java 9 edit ini file.
Maven
Maven status: https://goo.gl/PxuqZF
Maven
• Maven Shade Plugin and Jigsaw don’t mix (uber jar)
• Example project with Maven and Java 9/Jigsaw:
• https://goo.gl/rmzKBa
NetBeans & Java 9
• NetBeans Developer Preview required for Java 9.
• New project template for modular projects.
• Creates Ant build files
NetBeans & Java 9
• Module structure not compatible with javac:
• <module>/classes/<source code>
• Detects imports where the module is not imported.
• Does not auto-import yet.
IntelliJ
• Support added in 2017.1 (release March 2017)
• For multi-module project:
1. Start with Empty Project
2. Add new module for each Jigsaw module
• IntelliJ detects when an import requires a module
definition
Demo
BEST PRACTICES
Java 9 Preparation
• Analyze dependencies using jdeps
• Immediately fix code using internal APIs
• Check transitive dependencies for internal JDK APIs
• Integrate jdeps into continuous integration
• Use Maven JDeps Plugin
• Analyze reflection code: setAccessible(true)
• Refactor code to remove duplicate packages across JARs
• common.jar: com.foo.utilities
• Server.jar com.foo.utilitie
Legacy Code
• If using internal JDK API, fix or use flag:
--add-exports, --add-opens, --permit-illegal-access
• If using removed JDK module: (ex. Activation):
--add-modules <module>
Analyze Project Structure
IntelliJ DSM
Analyzer
https://goo.gl/FLzCL7
Remove cycles!
Java EE & Spring
• Support for Jigsaw unknown
• Major effort required for containers to support Jigsaw
• Concerns raised in JCP voting over Jigsaw and EE
• Regardless: Dependencies on JDK internal APIs must be
immediately resolved.
Desktop App Impact
• Impacts of JDK internal dependencies maybe felt more on
Java desktop applications
• Many hacks were required to work around
limitations/bugs in Swing
• Older applications may need to be ported to JavaFX
Technical Debt Bill is NOW DUE.
Best Practice
• Don’t depend upon java.se
• Avoid using qualified exports
• Don’t remove exports from a module in future releases
• Keep modules-info clean:
• requires javafx.controls
• requires javafx.base; -- controls already includes base
Resources
• Books
• The Java 9 Module System (https://goo.gl/QM1LS1)
• Java 9 Modularity (https://goo.gl/zJeYsd)
• Links
• Issues: https://goo.gl/xK4ymJ
• Oracle Talks: http://openjdk.java.net/projects/jigsaw/talks/
• Tutorial: https://goo.gl/ET9Hn1
• Tutorial: https://goo.gl/GzPXTw
• Jigsaw vote explanation: https://goo.gl/sWUZvX
Focus on newer Jigsaw material (2016 or later)
Q&A
Twitter: @ctjava
Email: rcuprak@gmail.com / r5k@3ds.com
Blog: cuprak.info
Linkedin: www.linkedin.com/in/rcuprak
Slides: www.slideshare.net/rcuprak/presentations

More Related Content

What's hot

Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
Ryan Cuprak
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
Ryan Cuprak
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with Gradle
Wei Chen
 
Spring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's New
Sam Brannen
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Sam Brannen
 
Java 9 preview
Java 9 previewJava 9 preview
Java 9 preview
Ivan Krylov
 
Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)
Saeed Zarinfam
 
Java 9 Module System Introduction
Java 9 Module System IntroductionJava 9 Module System Introduction
Java 9 Module System Introduction
Dan Stine
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
Kevin Webber
 
Why Play Framework is fast
Why Play Framework is fastWhy Play Framework is fast
Why Play Framework is fast
Legacy Typesafe (now Lightbend)
 
Migrating to Java 9 Modules
Migrating to Java 9 ModulesMigrating to Java 9 Modules
Migrating to Java 9 Modules
Sander Mak (@Sander_Mak)
 
Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud
Shekhar Gulati
 
Java build tool_comparison
Java build tool_comparisonJava build tool_comparison
Java build tool_comparison
Manav Prasad
 
Introduction tomaven
Introduction tomavenIntroduction tomaven
Introduction tomaven
Manav Prasad
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7
Arun Gupta
 
Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)
Robert Scholte
 
Migrating to java 9 modules
Migrating to java 9 modulesMigrating to java 9 modules
Migrating to java 9 modules
Paul Bakker
 
Scala play-framework
Scala play-frameworkScala play-framework
Scala play-framework
Abdhesh Kumar
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
Summer Lu
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9
Deepu Xavier
 

What's hot (20)

Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with Gradle
 
Spring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's New
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
 
Java 9 preview
Java 9 previewJava 9 preview
Java 9 preview
 
Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)Web application development using Play Framework (with Java)
Web application development using Play Framework (with Java)
 
Java 9 Module System Introduction
Java 9 Module System IntroductionJava 9 Module System Introduction
Java 9 Module System Introduction
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
Why Play Framework is fast
Why Play Framework is fastWhy Play Framework is fast
Why Play Framework is fast
 
Migrating to Java 9 Modules
Migrating to Java 9 ModulesMigrating to Java 9 Modules
Migrating to Java 9 Modules
 
Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud Java(ee) mongo db applications in the cloud
Java(ee) mongo db applications in the cloud
 
Java build tool_comparison
Java build tool_comparisonJava build tool_comparison
Java build tool_comparison
 
Introduction tomaven
Introduction tomavenIntroduction tomaven
Introduction tomaven
 
Getting Started with Java EE 7
Getting Started with Java EE 7Getting Started with Java EE 7
Getting Started with Java EE 7
 
Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)
 
Migrating to java 9 modules
Migrating to java 9 modulesMigrating to java 9 modules
Migrating to java 9 modules
 
Scala play-framework
Scala play-frameworkScala play-framework
Scala play-framework
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
 
Preparing your code for Java 9
Preparing your code for Java 9Preparing your code for Java 9
Preparing your code for Java 9
 

Similar to Preparing for java 9 modules upload

Java Platform Module System
Java Platform Module SystemJava Platform Module System
Java Platform Module System
Vignesh Ramesh
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Mihail Stoynov
 
What we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan KrylovWhat we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan Krylov
J On The Beach
 
Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)
Robert Scholte
 
Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)
Robert Scholte
 
Java 9, JShell, and Modularity
Java 9, JShell, and ModularityJava 9, JShell, and Modularity
Java 9, JShell, and Modularity
Mohammad Hossein Rimaz
 
Java modules
Java modulesJava modules
Java modules
Rory Preddy
 
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Robert Scholte
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
Scheidt & Bachmann
 
As7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongAs7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yong
jbossug
 
Java 9 / Jigsaw - AJUG/VJUG session
Java 9 / Jigsaw - AJUG/VJUG  sessionJava 9 / Jigsaw - AJUG/VJUG  session
Java 9 / Jigsaw - AJUG/VJUG session
Mani Sarkar
 
OOP with Java
OOP with JavaOOP with Java
OOP with Java
OmegaHub
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
Simon Ritter
 
An overview of Scalable Web Application Front-end
An overview of Scalable Web Application Front-endAn overview of Scalable Web Application Front-end
An overview of Scalable Web Application Front-end
Saeid Zebardast
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)
Robert Scholte
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
DanHeidinga
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)
David Bosschaert
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
JAX London
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
njbartlett
 
Leaner microservices with Java 10
Leaner microservices with Java 10Leaner microservices with Java 10
Leaner microservices with Java 10
Arto Santala
 

Similar to Preparing for java 9 modules upload (20)

Java Platform Module System
Java Platform Module SystemJava Platform Module System
Java Platform Module System
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
 
What we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan KrylovWhat we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan Krylov
 
Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)
 
Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)
 
Java 9, JShell, and Modularity
Java 9, JShell, and ModularityJava 9, JShell, and Modularity
Java 9, JShell, and Modularity
 
Java modules
Java modulesJava modules
Java modules
 
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
As7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongAs7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yong
 
Java 9 / Jigsaw - AJUG/VJUG session
Java 9 / Jigsaw - AJUG/VJUG  sessionJava 9 / Jigsaw - AJUG/VJUG  session
Java 9 / Jigsaw - AJUG/VJUG session
 
OOP with Java
OOP with JavaOOP with Java
OOP with Java
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
 
An overview of Scalable Web Application Front-end
An overview of Scalable Web Application Front-endAn overview of Scalable Web Application Front-end
An overview of Scalable Web Application Front-end
 
Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)Apache Maven supports all Java (JokerConf 2018)
Apache Maven supports all Java (JokerConf 2018)
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
Leaner microservices with Java 10
Leaner microservices with Java 10Leaner microservices with Java 10
Leaner microservices with Java 10
 

More from Ryan Cuprak

Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)
Ryan Cuprak
 
DIY Home Weather Station (Devoxx Poland 2023)
DIY Home Weather Station (Devoxx Poland 2023)DIY Home Weather Station (Devoxx Poland 2023)
DIY Home Weather Station (Devoxx Poland 2023)
Ryan Cuprak
 
Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS Lambda
Ryan Cuprak
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
Ryan Cuprak
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
Ryan Cuprak
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
Ryan Cuprak
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
Ryan Cuprak
 
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
Ryan Cuprak
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 
JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014
Ryan Cuprak
 
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
50 EJB 3 Best Practices in 50 Minutes - JavaOne 201450 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
Ryan Cuprak
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Ryan Cuprak
 
JavaOne 2013: Organizing Your Local Community
JavaOne 2013: Organizing Your Local CommunityJavaOne 2013: Organizing Your Local Community
JavaOne 2013: Organizing Your Local Community
Ryan Cuprak
 

More from Ryan Cuprak (13)

Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)Jakarta EE Test Strategies (2022)
Jakarta EE Test Strategies (2022)
 
DIY Home Weather Station (Devoxx Poland 2023)
DIY Home Weather Station (Devoxx Poland 2023)DIY Home Weather Station (Devoxx Poland 2023)
DIY Home Weather Station (Devoxx Poland 2023)
 
Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS Lambda
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
Combining R With Java For Data Analysis (Devoxx UK 2015 Session)
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014JavaFX Versus HTML5 - JavaOne 2014
JavaFX Versus HTML5 - JavaOne 2014
 
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
50 EJB 3 Best Practices in 50 Minutes - JavaOne 201450 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
50 EJB 3 Best Practices in 50 Minutes - JavaOne 2014
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
 
JavaOne 2013: Organizing Your Local Community
JavaOne 2013: Organizing Your Local CommunityJavaOne 2013: Organizing Your Local Community
JavaOne 2013: Organizing Your Local Community
 

Recently uploaded

Bhiwandi @Call @Girls Whatsapp 000000000 With Best And No 1
Bhiwandi @Call @Girls Whatsapp 000000000 With Best And No 1Bhiwandi @Call @Girls Whatsapp 000000000 With Best And No 1
Bhiwandi @Call @Girls Whatsapp 000000000 With Best And No 1
arvindkumarji156
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
miso_uam
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Sparity1
 
Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
Ortus Solutions, Corp
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
ThousandEyes
 
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsSeamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Estuary Flow
 
Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
Mumbai @Call @Girls Whatsapp 9930687706 With High Profile ServiceMumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
kolkata dolls
 
AI Chatbot Development – A Comprehensive Guide  .pdf
AI Chatbot Development – A Comprehensive Guide  .pdfAI Chatbot Development – A Comprehensive Guide  .pdf
AI Chatbot Development – A Comprehensive Guide  .pdf
ayushiqss
 
Ghatkopar @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
Ghatkopar @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai AvailableGhatkopar @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
Ghatkopar @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
aviva54
 
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdfWhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
onemonitarsoftware
 
ANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdfANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdf
sachin chaurasia
 
dachnug51 - HCLs evolution of the employee experience platform.pdf
dachnug51 - HCLs evolution of the employee experience platform.pdfdachnug51 - HCLs evolution of the employee experience platform.pdf
dachnug51 - HCLs evolution of the employee experience platform.pdf
DNUG e.V.
 
bangalore @Call @Girls 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 WhatsApp Number for Real Meet
bangalore @Call @Girls 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 WhatsApp Number for Real Meetbangalore @Call @Girls 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 WhatsApp Number for Real Meet
bangalore @Call @Girls 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 WhatsApp Number for Real Meet
rajesvigrag
 
How we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hoursHow we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hours
Ortus Solutions, Corp
 
@Call @Girls in Kolkata 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Best High Class Kolkata Avaulable
 @Call @Girls in Kolkata 🐱‍🐉  XXXXXXXXXX 🐱‍🐉  Best High Class Kolkata Avaulable @Call @Girls in Kolkata 🐱‍🐉  XXXXXXXXXX 🐱‍🐉  Best High Class Kolkata Avaulable
@Call @Girls in Kolkata 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Best High Class Kolkata Avaulable
DiyaSharma6551
 
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
Hironori Washizaki
 
@Call @Girls in Saharanpur 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Tanisha Sharma Best High Clas...
 @Call @Girls in Saharanpur 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 Tanisha Sharma Best High Clas... @Call @Girls in Saharanpur 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 Tanisha Sharma Best High Clas...
@Call @Girls in Saharanpur 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Tanisha Sharma Best High Clas...
AlinaDevecerski
 
Folding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a seriesFolding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a series
Philip Schwarz
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Asher Sterkin
 
Kolkata @Call @Girls 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Genuine WhatsApp Number for Real Meet
Kolkata @Call @Girls 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 Genuine WhatsApp Number for Real MeetKolkata @Call @Girls 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 Genuine WhatsApp Number for Real Meet
Kolkata @Call @Girls 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Genuine WhatsApp Number for Real Meet
lovelykumarilk789
 

Recently uploaded (20)

Bhiwandi @Call @Girls Whatsapp 000000000 With Best And No 1
Bhiwandi @Call @Girls Whatsapp 000000000 With Best And No 1Bhiwandi @Call @Girls Whatsapp 000000000 With Best And No 1
Bhiwandi @Call @Girls Whatsapp 000000000 With Best And No 1
 
Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)Software development... for all? (keynote at ICSOFT'2024)
Software development... for all? (keynote at ICSOFT'2024)
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
 
Intro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AIIntro to Amazon Web Services (AWS) and Gen AI
Intro to Amazon Web Services (AWS) and Gen AI
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
 
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsSeamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple Steps
 
Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
Mumbai @Call @Girls Whatsapp 9930687706 With High Profile ServiceMumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
Mumbai @Call @Girls Whatsapp 9930687706 With High Profile Service
 
AI Chatbot Development – A Comprehensive Guide  .pdf
AI Chatbot Development – A Comprehensive Guide  .pdfAI Chatbot Development – A Comprehensive Guide  .pdf
AI Chatbot Development – A Comprehensive Guide  .pdf
 
Ghatkopar @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
Ghatkopar @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai AvailableGhatkopar @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
Ghatkopar @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
 
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdfWhatsApp Tracker -  Tracking WhatsApp to Boost Online Safety.pdf
WhatsApp Tracker - Tracking WhatsApp to Boost Online Safety.pdf
 
ANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdfANSYS Mechanical APDL Introductory Tutorials.pdf
ANSYS Mechanical APDL Introductory Tutorials.pdf
 
dachnug51 - HCLs evolution of the employee experience platform.pdf
dachnug51 - HCLs evolution of the employee experience platform.pdfdachnug51 - HCLs evolution of the employee experience platform.pdf
dachnug51 - HCLs evolution of the employee experience platform.pdf
 
bangalore @Call @Girls 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 WhatsApp Number for Real Meet
bangalore @Call @Girls 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 WhatsApp Number for Real Meetbangalore @Call @Girls 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 WhatsApp Number for Real Meet
bangalore @Call @Girls 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 WhatsApp Number for Real Meet
 
How we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hoursHow we built TryBoxLang in under 48 hours
How we built TryBoxLang in under 48 hours
 
@Call @Girls in Kolkata 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Best High Class Kolkata Avaulable
 @Call @Girls in Kolkata 🐱‍🐉  XXXXXXXXXX 🐱‍🐉  Best High Class Kolkata Avaulable @Call @Girls in Kolkata 🐱‍🐉  XXXXXXXXXX 🐱‍🐉  Best High Class Kolkata Avaulable
@Call @Girls in Kolkata 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Best High Class Kolkata Avaulable
 
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...
 
@Call @Girls in Saharanpur 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Tanisha Sharma Best High Clas...
 @Call @Girls in Saharanpur 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 Tanisha Sharma Best High Clas... @Call @Girls in Saharanpur 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 Tanisha Sharma Best High Clas...
@Call @Girls in Saharanpur 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Tanisha Sharma Best High Clas...
 
Folding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a seriesFolding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a series
 
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
Ported to Cloud with Wing_ Blue ZnZone app from _Hexagonal Architecture Expla...
 
Kolkata @Call @Girls 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Genuine WhatsApp Number for Real Meet
Kolkata @Call @Girls 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 Genuine WhatsApp Number for Real MeetKolkata @Call @Girls 🐱‍🐉  XXXXXXXXXX 🐱‍🐉 Genuine WhatsApp Number for Real Meet
Kolkata @Call @Girls 🐱‍🐉 XXXXXXXXXX 🐱‍🐉 Genuine WhatsApp Number for Real Meet
 

Preparing for java 9 modules upload

  • 1. Preparing for Java 9 Modules Ryan Cuprak
  • 2. About Twitter: @ctjava Email: rcuprak@gmail.com / r5k@3ds.com Blog: cuprak.info Linkedin: www.linkedin.com/in/rcuprak
  • 3. Project Jigsaw Goals • Make the Java platform scalable for small computing devices. • Improve platform security and maintainability • Enable improved application performance • Simplify library creation and application development Reliable configuration Strong Encapsulation
  • 4. Why Modules? • Java currently suffers from JAR ”hell” • Maven tracks dependencies but no runtime enforcement • No guarantee an application can start: NoClassDefFoundError • Possible to mix library versions on classpath: • commons-io-2.5 and commons-io-1.6 – what happens? • Existing module frameworks (OSGi) can’t be used to modularize the Java platform.
  • 5. Project Jigsaw Pieces • JEPs • 200: Modular JDK • 201: Modular Source Code • 220: Modular Run-time Images • 260: Encapsulate Most Internal APIs • 261: Module System • 282: jlink: Java Linker • JSR 376 Java Platform Module System
  • 6. Project Jigsaw • Target Release Date: July 27th now September 21st 2017 You now have time!
  • 7. Comparing Jigsaw / OSGi / Java EE Feature Jigsaw OSGi Java EE Allows cycles between packages in different modules ❌ ✅ ✅ Isolated package namespaces ❌ ✅ ✅ Allows lazy loading ❌ ✅ ✅ Allows dynamic package addition ❌ ✅ ✅ Unrestricted naming ❌ ❌ ✅ Allows multiple versions of an artifact* ❌ ✅ ✅ Allows split packages ❌ ✅ ✅ Allows textual descriptor ❌ ✅ ✅ Source: https://goo.gl/7RKqQx
  • 8. Class Loading & Module System Bootstrap Loader Platform Loader Application Loader Java Platform Module System Java Virtual Machine java.base java.logging java.sql java.corba jdk.compiler log4j
  • 9. Common Questions • Do I have to modularize my application to run on Java 9? • Will my Java 6/7/8 application compile on Java 9? • Will my Java 6/7/8 application run un-modified on Java 9? • How do I identify problems today? - NO - - Depends – using private APIs? - - Depends – using private APIs? - - jdeps -
  • 10. Common Questions… • Can I partially leverage modules? • Is tooling ready? (Maven/Gradle/IntelliJ/NetBeans/etc.) • Do application containers work on 9 today? • Can I try out Java 9 today? - YES - - Absolutely NOT - - Maybe - - YES -
  • 11. JEP 200: Modular JDK JDK is fully modularized!
  • 12. jdeps • Command line tool included with Java 8 • Static class dependency checker • Key parameters • -jdkinternals – flags internal API usage that will break in Java 9 • -dotoutput <dir> - dot output files • -cp – classpath to analyze • -verbose:class/package – package/class level dependencies • Use jdeps on all generated output and dependencies
  • 13. jdeps – Example jdeps -jdkinternals jide-common.jar jide-common.jar -> /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/rt.jar com.jidesoft.plaf.aqua.AquaJidePopupMenuUI (jide-common.jar) -> com.apple.laf.AquaPopupMenuUI JDK internal API (rt.jar) com.jidesoft.plaf.aqua.AquaRangeSliderUI (jide-common.jar) -> apple.laf.JRSUIConstants JDK internal API (rt.jar) -> apple.laf.JRSUIConstants$Orientation JDK internal API (rt.jar) -> apple.laf.JRSUIConstants$State JDK internal API (rt.jar) -> com.apple.laf.AquaSliderUI JDK internal API (rt.jar) com.jidesoft.plaf.basic.BasicFolderChooserUI (jide-common.jar) -> sun.awt.shell.ShellFolder JDK internal API (rt.jar) com.jidesoft.plaf.basic.BasicPainter (jide-common.jar) -> sun.swing.plaf.synth.SynthIcon JDK internal API (rt.jar) com.jidesoft.plaf.metal.MetalUtils$GradientPainter (jide-common.jar) -> sun.swing.CachedPainter JDK internal API (rt.jar) com.jidesoft.plaf.windows.AnimationController (jide-common.jar) -> sun.awt.AppContext JDK internal API (rt.jar) -> sun.security.action.GetBooleanAction JDK internal API (rt.jar) … JIDE: Widely used Swing component library (jidesoft.com)
  • 15. jdeps: Build Integration Maven JDeps Plugin: https://goo.gl/thr88W Goals: • jdeps:jdkinternals • jdeps:test-jdkinternals
  • 17. Java Visibility Today How do you hide the implementation class?
  • 18. Java Accessibility JDK 1-8 JDK 9+ public public protected public to specific modules <package> public only within a module private protected <package> private
  • 19. Module Definition • module-info.java defines a module • Contents define the following: • Unique name of the module • Dependencies of the module • Packages to be exported for use by other modules • Placed at root of the namespace Module Name exports requires
  • 20. Module Definition <open> module <module-name> { [export <java package> [to <module name>] [requires [transitive] <module-name>] [opens <module name> [to <module name]] [provides <interface> with <implementation>] [uses <interface>] }
  • 21. Module Basics • Module names must be unique • Names should follow reverse domain name pattern • Modules are eagerly loaded • Dependency graph is built and checked on startup • Application won’t start if modules are missing • No support for versioning • Only one version of a module may be loaded • Layers maybe used to load different versions of a module
  • 22. About Versioning… • Two modules with the same package names in them are considered to be different versions of the same module. • Two modules with the same name are considered to be two versions of the same module. • Concealed package conflicts: • When two modules have the same package name in them, but the package is private in both modules, the module system cannot load both modules into the same layer
  • 23. Introducing the Module Path • Module path augments / extends the classpath • All command line tools now include both --module-path --upgrade-module-path --add-modules --describe-module --dry-run --validate-modules • Use java –list-modules to see all available modules Parameters on java command
  • 24. JDK Modules • jdk.base is included by default. • java.se and java.se.ee are aggregator modules • java.se.ee contains the following modules: • java.corba • java.transaction • java.xml.ws.annotation • javax.xml.ws • java.xml.bind • java.activation • java runs with java.se modules – not java.se.ee
  • 27. Simple Module Example javac -d out src/org/ctjava/services/MeetingService.java src/org/ctjava/services/impl/MeetingServiceImpl.java src/module-info.java Cannot use reflection to find MeetingServiceImpl
  • 28. Simple Module Example… Compiler Output: Module Definition
  • 30. Compiling javac -d out --module-source-path src $(find . -name "*.java") Module Module Directory containing module uses module name. Names must match or compiler error.
  • 31. Packaging jar --create --file=org.ctjava.model@1.0.jar --module-version=1.0 -C out/org.ctjava.model . jar --create --file=org.ctjava.service@1.0.jar --module-version=1.0 -C out/org.ctjava.service . Note: Module version isn’t used for module resolution. It is recorded in module-info.class.
  • 35. Qualified Exports… Exception in thread "main" java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:946) Caused by: java.lang.RuntimeException: Unable to construct Application instance: class org.ctjava.admin.AdminConsole at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:963) at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:198) at java.base/java.lang.Thread.run(Thread.java:844) Caused by: java.lang.IllegalAccessException: class com.sun.javafx.application.LauncherImpl (in module javafx.graphics) cannot access class org.ctjava.admin.AdminConsole (in module org.ctjava.admin) because module org.ctjava.admin does not export org.ctjava.admin to module javafx.graphics • JavaFX LauncherImpl cannot access AdminConsole • Class in javafx.graphics tried to instantiate AdminConsole in org.ctjava.admin
  • 37. jlink • Generates a runtime-image including the JVM. • Only required modules are included • Basic invocation: jlink --module-path <modulepath> --add-modules <modules> --limit-modules <modules> --output <path> Demo used JavaFX: 95 mb Full JDK: 454 mb
  • 40. Deprecated Modules… java -jar WebEndpointTest.jar Worked on Java 8 – what happened? Fix: java --add-modules java.xml.ws -jar WebEndpointTest.jar
  • 41. Module Types Automatic Modules • Mechanism for using JARs which do not include a module-info.java configuration • Export all of the JAR packages • Reads all other modules • Module name is dynamically generated Unamed Module • Alls JARs and classes on the classpath will be contained un the Unamed Module. • Similar to Automatic Modules • Does not possess a name Platform Modules • JDK modules
  • 42. JARs & Module System --module-path -classpath Modular JAR Application Module Unnamed Module Non-modular JAR Automatic Module Unnamed Module Unnamed module name: ALL-UNNAMED
  • 43. Readability Module Type Origin Export Packages Read Modules Named Platform Provided by platform Explicitly Named Application All JARS containing module-info on the module path Explicitly • Platform • Application • Automatic Automatic All JARs without module- info but on module path All • Platform • Application • Automatic • Unnamed Unnamed Classpath All • Platform • Automatic • Application
  • 45. Automatic Modules… Code in MyInvocationLibrary: Code in org.ctjava.admin – module:
  • 46. Automatic Modules… java.lang.IllegalAccessException: class org.ctjava.util.InstantiateUtility (in module MyInvocationLibrary) cannot access class org.ctjava.admin.AdminCallback (in module org.ctjava.admin) because module org.ctjava.admin does not export org.ctjava.admin to module MyInvocationLibrary
  • 47. Escape & Encapsulation Kill Switch Important javac command line options: --add-opens – opens a package --permit-illegal-access - All code in the unnamed module can access other types regardless of any limitations. Will result in a WARNING: to be removed in Java 10.
  • 49. Services • API first added in Java 6 • Rarely used outside of JDK • Enhanced/altered for Jigsaw
  • 54. JAVA 9 TOOLING June 2017 Status
  • 55. Tooling Support • Early access JDK 9 builds: http://jdk.java.net/9/ • Use jenv to swich between Java 8 & 9 http://www.jenv.io/ Examples: jenv local 9-ea (locally switch to Java 9) jevn global 1.8 (globally use Java 8) Note: rt.jar and tools.jar were removed.
  • 56. Tooling Support Tool Status NetBeans 9 🔶 Developer Preview IntelliJ 2017.1 ✅ Eclipse 🔶 Maven ❌ Gradle ❌ • Maven & Gradle do not generate module-info.java. • Gradle 3.4 doesn’t work on Java 9 • Maven 3.5 doesn’t completely work (not all plugins compatible) • Eclipse Neon won’t start with Java 9 edit ini file.
  • 58. Maven • Maven Shade Plugin and Jigsaw don’t mix (uber jar) • Example project with Maven and Java 9/Jigsaw: • https://goo.gl/rmzKBa
  • 59. NetBeans & Java 9 • NetBeans Developer Preview required for Java 9. • New project template for modular projects. • Creates Ant build files
  • 60. NetBeans & Java 9 • Module structure not compatible with javac: • <module>/classes/<source code> • Detects imports where the module is not imported. • Does not auto-import yet.
  • 61. IntelliJ • Support added in 2017.1 (release March 2017) • For multi-module project: 1. Start with Empty Project 2. Add new module for each Jigsaw module • IntelliJ detects when an import requires a module definition
  • 62. Demo
  • 64. Java 9 Preparation • Analyze dependencies using jdeps • Immediately fix code using internal APIs • Check transitive dependencies for internal JDK APIs • Integrate jdeps into continuous integration • Use Maven JDeps Plugin • Analyze reflection code: setAccessible(true) • Refactor code to remove duplicate packages across JARs • common.jar: com.foo.utilities • Server.jar com.foo.utilitie
  • 65. Legacy Code • If using internal JDK API, fix or use flag: --add-exports, --add-opens, --permit-illegal-access • If using removed JDK module: (ex. Activation): --add-modules <module>
  • 66. Analyze Project Structure IntelliJ DSM Analyzer https://goo.gl/FLzCL7 Remove cycles!
  • 67. Java EE & Spring • Support for Jigsaw unknown • Major effort required for containers to support Jigsaw • Concerns raised in JCP voting over Jigsaw and EE • Regardless: Dependencies on JDK internal APIs must be immediately resolved.
  • 68. Desktop App Impact • Impacts of JDK internal dependencies maybe felt more on Java desktop applications • Many hacks were required to work around limitations/bugs in Swing • Older applications may need to be ported to JavaFX Technical Debt Bill is NOW DUE.
  • 69. Best Practice • Don’t depend upon java.se • Avoid using qualified exports • Don’t remove exports from a module in future releases • Keep modules-info clean: • requires javafx.controls • requires javafx.base; -- controls already includes base
  • 70. Resources • Books • The Java 9 Module System (https://goo.gl/QM1LS1) • Java 9 Modularity (https://goo.gl/zJeYsd) • Links • Issues: https://goo.gl/xK4ymJ • Oracle Talks: http://openjdk.java.net/projects/jigsaw/talks/ • Tutorial: https://goo.gl/ET9Hn1 • Tutorial: https://goo.gl/GzPXTw • Jigsaw vote explanation: https://goo.gl/sWUZvX Focus on newer Jigsaw material (2016 or later)
  • 71. Q&A Twitter: @ctjava Email: rcuprak@gmail.com / r5k@3ds.com Blog: cuprak.info Linkedin: www.linkedin.com/in/rcuprak Slides: www.slideshare.net/rcuprak/presentations