SlideShare a Scribd company logo
Migrating to Java 11
1DEVNEXUS 2019
Dalia Abo Sheasha
WebSphere Migration Tools Development Lead
Email: dalia@us.ibm.com
Twitter: @DaliaShea
Agenda
2DEVNEXUS 2019
• Background
• Java 9/10/11: New Features
• Java 8 -> Java 11: Migration Concerns
• Removed Packages/Classes/Methods
• Migration Tools
DEVNEXUS 2019
Java Timeline (Current)
2012 2014 2017 2018 2019
Sept2017
Java 9
March2018
Java 10
Java 12
March2019
July2011
Java 7 (LTS)
March2014
Java 8 (LTS)
Sept2018
Java 11 (LTS)
DEVNEXUS 2019
Java Timeline (Future )
2014 2017 2018
Sept2018
2019Sept2017
March2018
Java 11
Java 9
Java 10
Java 12
March2019
March2014
Java 8
2020 2021 2022
Java 13
Java 14
Java 15
Java 16
Java 17
(LTS)
(LTS)
(LTS)
5DEVNEXUS 2019
Java 9/10/11: New Features
Tons of Features!
• ( JDK 9, JDK 10, JDK 11 )
• var for local variables (JEP 286)
• Launch Single-File Source-Code Programs
(JEP 330)
• New methods in several classes (Optional,
Collection, etc)
• TLS 1.3
• …
Java 9/10/11: Modularity
6DEVNEXUS 2019
• Java Platform Module System (JPMS)
• Breaks code into modules containing packages
• Applications must declare dependency on modules for access
• Very disruptive
• “Kill switch” on by default (currently)
• --illegal-access=permit
7DEVNEXUS 2019
Java 8 -> Java 11
Java 8 -> Java 11: Migration Concerns
8DEVNEXUS 2019
• Removals
• Packages, classes and methods
• Previously deprecated
• General Migration Strategy: Replace
• Not previously deprecated
• General Migration Strategy: Depends…
• Behavior changes
• Information Source: Java 9/10/11 compatibility guides and release notes
Java 8 -> Java 11: Removed
Packages/Classes
9DEVNEXUS 2019
Removed Security classes:
• com.sun.security.auth.PolicyFile
• com.sun.security.auth.SolarisNumericGroupPrincipal
• com.sun.security.auth.SolarisNumericUserPrincipal
• com.sun.security.auth.SolarisPrincipal
• com.sun.security.auth.X500Principal
• com.sun.security.auth.callback.DialogCallbackHandler
• com.sun.security.auth.module.SolarisLoginModule
• com.sun.security.auth.module.SolarisSystem
• javax.security.auth.Policy
Java 8
Java 11
Java 8 -> Java 11: Removed
Packages/Classes
10DEVNEXUS 2019
Removed AWT APIs:
• java.awt.peer.*
• java.awt.dnd.peer.*
• com.sun.awt.AWTUtilities
Removed DOM APIs:
• com.sun.java.browser.plugin2.DOM
• sun.plugin.dom.DOMObject
Removed Misc:
• com.sun.image.codec.jpeg.*
• com.sun.xml.internal.bind.*
11DEVNEXUS 2019
Java 8 -> Java 11: Removed Java EE Modules
java.activation
javax.activation
java.corba
javax.rmi
javax.rmi.CORBA
org.omg.CORBA
org.omg.CORBA_2_3
org.omg.CORBA_2_3.portable
org.omg.CORBA.*
org.omg.CosNaming
...
org.omg.PortableInterceptor
org.omg.PortableInterceptor.*
org.omg.PortableServer
org.omg.PortableServer.*
org.omg.SendingContext
org.omg.stub.java.rmi
java.transaction
javax.transaction
java.xml.bind
javax.xml.bind
javax.xml.bind.annotation
javax.xml.bind.annotation.adapters
javax.xml.bind.attachment
javax.xml.bind.helpers
javax.xml.bind.util
java.xml.ws
javax.jws
javax.jws.soap
javax.xml.soap
javax.xml.ws
javax.xml.ws.handler
javax.xml.ws.handler.soap
javax.xml.ws.http
javax.xml.ws.soap
javax.xml.ws.spi
javax.xml.ws.spi.http
javax.xml.ws.wsaddressing
java.xml.ws.annotation
javax.annotation
Option 1: package your own dependencies
Option 2: rely on the app server to provide them (OpenLiberty with Java 11)
Java 8 -> Java 11: Removed
Methods
12DEVNEXUS 2019
Removed java.lang.SecurityManager
Methods:
• java.lang.SecurityManager.checkAwtEventQueueAccess
• java.lang.SecurityManager.checkSystemClipboardAccess
• java.lang.SecurityManager.checkMemberAccess
• java.lang.SecurityManager.checkTopLevelWindow
• java.lang.SecurityManager.classDepth
• java.lang.SecurityManager.classLoaderDepth
• java.lang.SecurityManager.currentClassLoader
• java.lang.SecurityManager.currentLoadedClass
• java.lang.SecurityManager.getInCheck
• java.lang.SecurityManager.inClass
• java.lang.SecurityManager.inClassLoader
Java 8
Java 11
Java 8 -> Java 11: Removed
Methods
13DEVNEXUS 2019
Removed java.lang.Thread
Methods:
• java.lang.Thread.destroy()
• java.lang.Thread.stop(java.lang.Throwable)
Removed java.lang.Runtime
Methods:
• java.lang.Runtime.getLocalizedInputStream
• java.lang.Runtime.getLocalizedOutputStream
• java.lang.Runtime.runFinalizersOnExit
Removed java.lang.System Method:
• java.lang.System.runFinalizersOnExit
Java 8 -> Java 11: Removed
Methods
14DEVNEXUS 2019
Removed java.util.logging.LogManager
Methods:
• java.util.logging.LogManager.addPropertyChangeListener
• java.util.logging.LogManager.removePropertyChangeListener
Removed
java.util.jar.Pack200.Packer/Unpacker
Methods:
• java.util.jar.Pack200.Packer.addPropertyChangeListener
• java.util.jar.Pack200.Packer.removePropertyChangeListener
• java.util.jar.Pack200.Unpacker.addPropertyChangeListener
• java.util.jar.Pack200.Unpacker.removePropertyChangeListener
Java 8 -> Java 11: Other
Changes
15DEVNEXUS 2019
Technology Removal:
• Java Web Start
• JavaFX (separate product)
Other Removals:
• @jdk.Exported
• netdoc protocol handler
Behavior changes
• java.lang.Class.getAnnotation()
• java.nio.channels.DatagramChannel.send()
And much more…
• Oracle JDK 11 Migration Guide
16DEVNEXUS 2019
Java 8 -> Java 11
Where do I start?
17DEVNEXUS 2019
Application Binary Scanner Tool
• Download: https://developer.ibm.com/wasdev/downloads/#asset/tools-
Migration_Toolkit_for_Application_Binaries
• Command Line tool (Runs with Java 7 and later)
• Scans application binaries
• Accepts .ear/.war files (and .jar files with --analyze option)
• No app server required
• Flags potential migration issues for a variety of scenarios
• Java SE versions
• On-premise -> Cloud
• Others…
18DEVNEXUS 2019
Demo: Application Binary Scanner Tool
19DEVNEXUS 2019
Application Source Scanner Tool
• Download: https://developer.ibm.com/wasdev/downloads/#asset/tools-
WebSphere_Application_Server_Migration_Toolkit
• Eclipse Plugin
• Scans application source code
• Flags potential migration issues for a variety of scenarios including Java SE versions
• Click-and-go to affected code line
• Documentation
• See Chapter 3-4 for installation details
20DEVNEXUS 2019
Demo: Application Source Scanner Tool
21DEVNEXUS 2019
Java class dependency analyzer (Jdeps)
• Command utility shipped with JDK
• Multiple Options
• Migration Relevant Option: -jdkinternals
• Accepts jars, class files, directories
• Binary scanner and source scanner will recommend if applicable
• Limitations
• Subset of removed APIs
• No method removal flagging
• Java version specific (i.e. running Jdeps shipped with Java 8 is different than Java 11)
• Documentation
22DEVNEXUS 2019
TL;DR
1. Download the Binary scanner:
https://developer.ibm.com/wasdev/downloads/#asset/tools-
Migration_Toolkit_for_Application_Binaries
2. Follow the prompts to install the jar.
3. Run the binary scanner against your application binaries. Here is my command:
java -jar binaryAppScanner.jar C:AppsMyApplication.war --sourceAppServer=liberty --
targetAppServer=liberty --sourceJava=ibm8 --targetJava=openjdk11
• Command help:
• java -jar binaryAppScanner.jar --help
• java -jar binaryAppScanner.jar --help --analyze
4. Review the report and read the help for each flagged issue to resolve them.
References/Resources
23DEVNEXUS 2019
• My Blog on adding the Java 11 feature to the migration tools (https://developer.ibm.com/tutorials/migration-to-java-11-
made-easy/)
• Binary Scanner – see the Additional information section (https://developer.ibm.com/wasdev/downloads/#asset/tools-
Migration_Toolkit_for_Application_Binaries)
• Source Scanner – see the Additional information section (https://developer.ibm.com/wasdev/downloads/#asset/tools-
WebSphere_Application_Server_Migration_Toolkit)
• Oracle Java SE Support Roadmap (https://www.oracle.com/technetwork/java/java-se-support-roadmap.html)
• Oracle JDK Migration Guide (https://docs.oracle.com/en/java/javase/11/migrate/index.html)
• AdoptOpenJDK (https://adoptopenjdk.net)
• Migrating from Oracle Java to AdoptOpenJDK (https://adoptopenjdk.net/MigratingtoAdoptOpenJDKfromOracleJava.pdf)
• AWT peer removals (http://mail.openjdk.java.net/pipermail/awt-dev/2015-February/008924.html)
• Andy Guibert’s blog on OpenLiberty Java 11 support (https://openliberty.io/blog/2019/02/06/java-11.html)
24DEVNEXUS 2019
Questions?
Email: dalia@us.ibm.com
Twitter: @DaliaShea

More Related Content

What's hot

Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
Rasheed Waraich
 
Java11 New Features
Java11 New FeaturesJava11 New Features
Java11 New Features
Haim Michael
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
Kaunas Java User Group
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
Dzmitry Naskou
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jiayun Zhou
 
Spring boot
Spring bootSpring boot
Spring boot
Bhagwat Kumar
 
Maven ppt
Maven pptMaven ppt
Maven ppt
natashasweety7
 
Introduction to basics of java
Introduction to basics of javaIntroduction to basics of java
Introduction to basics of java
vinay arora
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
José Paumard
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
Jeevesh Pandey
 
Java 9 New Features
Java 9 New FeaturesJava 9 New Features
Java 9 New Features
Ali BAKAN
 
From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0
VMware Tanzu
 
Maven
MavenMaven
Core java
Core java Core java
Core java
Ravi varma
 
java 8 new features
java 8 new features java 8 new features
java 8 new features
Rohit Verma
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
Izzet Mustafaiev
 
Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
Kaushal Dhruw
 

What's hot (20)

Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Java GC
Java GCJava GC
Java GC
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Java11 New Features
Java11 New FeaturesJava11 New Features
Java11 New Features
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring boot
Spring bootSpring boot
Spring boot
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Introduction to basics of java
Introduction to basics of javaIntroduction to basics of java
Introduction to basics of java
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Java 9 New Features
Java 9 New FeaturesJava 9 New Features
Java 9 New Features
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0From Spring Framework 5.3 to 6.0
From Spring Framework 5.3 to 6.0
 
Maven
MavenMaven
Maven
 
Core java
Core java Core java
Core java
 
java 8 new features
java 8 new features java 8 new features
java 8 new features
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
 

Similar to DevNexus 2019: Migrating to Java 11

Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
DaliaAboSheasha
 
Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
DaliaAboSheasha
 
Java
JavaJava
Java
kavirishi
 
How and why to upgrade to java 16 or 17
How and why to upgrade to java 16 or 17How and why to upgrade to java 16 or 17
How and why to upgrade to java 16 or 17
Johan Janssen
 
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
 
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 preview
Java 9 previewJava 9 preview
Java 9 preview
Ivan Krylov
 
Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
DaliaAboSheasha
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1
Rubens Dos Santos Filho
 
Dynamic Groovy Edges
Dynamic Groovy EdgesDynamic Groovy Edges
Dynamic Groovy Edges
Jimmy Ray
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell Youelliando dias
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1
Kevin Sutter
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
Murugesh33
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
Murugesh33
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
Arun Gupta
 
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
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
DanHeidinga
 
Developing Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open LibertyDeveloping Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open Liberty
YK Chang
 
Java in web 2 0 presentation
Java in web 2 0 presentationJava in web 2 0 presentation
Java in web 2 0 presentationPRAVEEN KUMAR
 

Similar to DevNexus 2019: Migrating to Java 11 (20)

Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
 
Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
 
Java
JavaJava
Java
 
How and why to upgrade to java 16 or 17
How and why to upgrade to java 16 or 17How and why to upgrade to java 16 or 17
How and why to upgrade to java 16 or 17
 
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)
 
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 preview
Java 9 previewJava 9 preview
Java 9 preview
 
Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1
 
Dynamic Groovy Edges
Dynamic Groovy EdgesDynamic Groovy Edges
Dynamic Groovy Edges
 
JRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell YouJRuby on Rails Deployment: What They Didn't Tell You
JRuby on Rails Deployment: What They Didn't Tell You
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after ModularityJavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
 
Developing Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open LibertyDeveloping Java Microservices Fast with Open Liberty
Developing Java Microservices Fast with Open Liberty
 
Java in web 2 0 presentation
Java in web 2 0 presentationJava in web 2 0 presentation
Java in web 2 0 presentation
 
Java™ in Web 2.0
Java™ in Web 2.0Java™ in Web 2.0
Java™ in Web 2.0
 

Recently uploaded

GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 

Recently uploaded (20)

GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 

DevNexus 2019: Migrating to Java 11

  • 1. Migrating to Java 11 1DEVNEXUS 2019 Dalia Abo Sheasha WebSphere Migration Tools Development Lead Email: dalia@us.ibm.com Twitter: @DaliaShea
  • 2. Agenda 2DEVNEXUS 2019 • Background • Java 9/10/11: New Features • Java 8 -> Java 11: Migration Concerns • Removed Packages/Classes/Methods • Migration Tools
  • 3. DEVNEXUS 2019 Java Timeline (Current) 2012 2014 2017 2018 2019 Sept2017 Java 9 March2018 Java 10 Java 12 March2019 July2011 Java 7 (LTS) March2014 Java 8 (LTS) Sept2018 Java 11 (LTS)
  • 4. DEVNEXUS 2019 Java Timeline (Future ) 2014 2017 2018 Sept2018 2019Sept2017 March2018 Java 11 Java 9 Java 10 Java 12 March2019 March2014 Java 8 2020 2021 2022 Java 13 Java 14 Java 15 Java 16 Java 17 (LTS) (LTS) (LTS)
  • 5. 5DEVNEXUS 2019 Java 9/10/11: New Features Tons of Features! • ( JDK 9, JDK 10, JDK 11 ) • var for local variables (JEP 286) • Launch Single-File Source-Code Programs (JEP 330) • New methods in several classes (Optional, Collection, etc) • TLS 1.3 • …
  • 6. Java 9/10/11: Modularity 6DEVNEXUS 2019 • Java Platform Module System (JPMS) • Breaks code into modules containing packages • Applications must declare dependency on modules for access • Very disruptive • “Kill switch” on by default (currently) • --illegal-access=permit
  • 8. Java 8 -> Java 11: Migration Concerns 8DEVNEXUS 2019 • Removals • Packages, classes and methods • Previously deprecated • General Migration Strategy: Replace • Not previously deprecated • General Migration Strategy: Depends… • Behavior changes • Information Source: Java 9/10/11 compatibility guides and release notes
  • 9. Java 8 -> Java 11: Removed Packages/Classes 9DEVNEXUS 2019 Removed Security classes: • com.sun.security.auth.PolicyFile • com.sun.security.auth.SolarisNumericGroupPrincipal • com.sun.security.auth.SolarisNumericUserPrincipal • com.sun.security.auth.SolarisPrincipal • com.sun.security.auth.X500Principal • com.sun.security.auth.callback.DialogCallbackHandler • com.sun.security.auth.module.SolarisLoginModule • com.sun.security.auth.module.SolarisSystem • javax.security.auth.Policy Java 8 Java 11
  • 10. Java 8 -> Java 11: Removed Packages/Classes 10DEVNEXUS 2019 Removed AWT APIs: • java.awt.peer.* • java.awt.dnd.peer.* • com.sun.awt.AWTUtilities Removed DOM APIs: • com.sun.java.browser.plugin2.DOM • sun.plugin.dom.DOMObject Removed Misc: • com.sun.image.codec.jpeg.* • com.sun.xml.internal.bind.*
  • 11. 11DEVNEXUS 2019 Java 8 -> Java 11: Removed Java EE Modules java.activation javax.activation java.corba javax.rmi javax.rmi.CORBA org.omg.CORBA org.omg.CORBA_2_3 org.omg.CORBA_2_3.portable org.omg.CORBA.* org.omg.CosNaming ... org.omg.PortableInterceptor org.omg.PortableInterceptor.* org.omg.PortableServer org.omg.PortableServer.* org.omg.SendingContext org.omg.stub.java.rmi java.transaction javax.transaction java.xml.bind javax.xml.bind javax.xml.bind.annotation javax.xml.bind.annotation.adapters javax.xml.bind.attachment javax.xml.bind.helpers javax.xml.bind.util java.xml.ws javax.jws javax.jws.soap javax.xml.soap javax.xml.ws javax.xml.ws.handler javax.xml.ws.handler.soap javax.xml.ws.http javax.xml.ws.soap javax.xml.ws.spi javax.xml.ws.spi.http javax.xml.ws.wsaddressing java.xml.ws.annotation javax.annotation Option 1: package your own dependencies Option 2: rely on the app server to provide them (OpenLiberty with Java 11)
  • 12. Java 8 -> Java 11: Removed Methods 12DEVNEXUS 2019 Removed java.lang.SecurityManager Methods: • java.lang.SecurityManager.checkAwtEventQueueAccess • java.lang.SecurityManager.checkSystemClipboardAccess • java.lang.SecurityManager.checkMemberAccess • java.lang.SecurityManager.checkTopLevelWindow • java.lang.SecurityManager.classDepth • java.lang.SecurityManager.classLoaderDepth • java.lang.SecurityManager.currentClassLoader • java.lang.SecurityManager.currentLoadedClass • java.lang.SecurityManager.getInCheck • java.lang.SecurityManager.inClass • java.lang.SecurityManager.inClassLoader Java 8 Java 11
  • 13. Java 8 -> Java 11: Removed Methods 13DEVNEXUS 2019 Removed java.lang.Thread Methods: • java.lang.Thread.destroy() • java.lang.Thread.stop(java.lang.Throwable) Removed java.lang.Runtime Methods: • java.lang.Runtime.getLocalizedInputStream • java.lang.Runtime.getLocalizedOutputStream • java.lang.Runtime.runFinalizersOnExit Removed java.lang.System Method: • java.lang.System.runFinalizersOnExit
  • 14. Java 8 -> Java 11: Removed Methods 14DEVNEXUS 2019 Removed java.util.logging.LogManager Methods: • java.util.logging.LogManager.addPropertyChangeListener • java.util.logging.LogManager.removePropertyChangeListener Removed java.util.jar.Pack200.Packer/Unpacker Methods: • java.util.jar.Pack200.Packer.addPropertyChangeListener • java.util.jar.Pack200.Packer.removePropertyChangeListener • java.util.jar.Pack200.Unpacker.addPropertyChangeListener • java.util.jar.Pack200.Unpacker.removePropertyChangeListener
  • 15. Java 8 -> Java 11: Other Changes 15DEVNEXUS 2019 Technology Removal: • Java Web Start • JavaFX (separate product) Other Removals: • @jdk.Exported • netdoc protocol handler Behavior changes • java.lang.Class.getAnnotation() • java.nio.channels.DatagramChannel.send() And much more… • Oracle JDK 11 Migration Guide
  • 16. 16DEVNEXUS 2019 Java 8 -> Java 11 Where do I start?
  • 17. 17DEVNEXUS 2019 Application Binary Scanner Tool • Download: https://developer.ibm.com/wasdev/downloads/#asset/tools- Migration_Toolkit_for_Application_Binaries • Command Line tool (Runs with Java 7 and later) • Scans application binaries • Accepts .ear/.war files (and .jar files with --analyze option) • No app server required • Flags potential migration issues for a variety of scenarios • Java SE versions • On-premise -> Cloud • Others…
  • 18. 18DEVNEXUS 2019 Demo: Application Binary Scanner Tool
  • 19. 19DEVNEXUS 2019 Application Source Scanner Tool • Download: https://developer.ibm.com/wasdev/downloads/#asset/tools- WebSphere_Application_Server_Migration_Toolkit • Eclipse Plugin • Scans application source code • Flags potential migration issues for a variety of scenarios including Java SE versions • Click-and-go to affected code line • Documentation • See Chapter 3-4 for installation details
  • 20. 20DEVNEXUS 2019 Demo: Application Source Scanner Tool
  • 21. 21DEVNEXUS 2019 Java class dependency analyzer (Jdeps) • Command utility shipped with JDK • Multiple Options • Migration Relevant Option: -jdkinternals • Accepts jars, class files, directories • Binary scanner and source scanner will recommend if applicable • Limitations • Subset of removed APIs • No method removal flagging • Java version specific (i.e. running Jdeps shipped with Java 8 is different than Java 11) • Documentation
  • 22. 22DEVNEXUS 2019 TL;DR 1. Download the Binary scanner: https://developer.ibm.com/wasdev/downloads/#asset/tools- Migration_Toolkit_for_Application_Binaries 2. Follow the prompts to install the jar. 3. Run the binary scanner against your application binaries. Here is my command: java -jar binaryAppScanner.jar C:AppsMyApplication.war --sourceAppServer=liberty -- targetAppServer=liberty --sourceJava=ibm8 --targetJava=openjdk11 • Command help: • java -jar binaryAppScanner.jar --help • java -jar binaryAppScanner.jar --help --analyze 4. Review the report and read the help for each flagged issue to resolve them.
  • 23. References/Resources 23DEVNEXUS 2019 • My Blog on adding the Java 11 feature to the migration tools (https://developer.ibm.com/tutorials/migration-to-java-11- made-easy/) • Binary Scanner – see the Additional information section (https://developer.ibm.com/wasdev/downloads/#asset/tools- Migration_Toolkit_for_Application_Binaries) • Source Scanner – see the Additional information section (https://developer.ibm.com/wasdev/downloads/#asset/tools- WebSphere_Application_Server_Migration_Toolkit) • Oracle Java SE Support Roadmap (https://www.oracle.com/technetwork/java/java-se-support-roadmap.html) • Oracle JDK Migration Guide (https://docs.oracle.com/en/java/javase/11/migrate/index.html) • AdoptOpenJDK (https://adoptopenjdk.net) • Migrating from Oracle Java to AdoptOpenJDK (https://adoptopenjdk.net/MigratingtoAdoptOpenJDKfromOracleJava.pdf) • AWT peer removals (http://mail.openjdk.java.net/pipermail/awt-dev/2015-February/008924.html) • Andy Guibert’s blog on OpenLiberty Java 11 support (https://openliberty.io/blog/2019/02/06/java-11.html)