SlideShare a Scribd company logo
MAKING THE
MOVE TO
JAVA 17
ALEX MOTLEY
@alexsmotley
CINDY HIGH
@CTHigh
ABOUT US
Alex Motley
Alex is a software engineer at IBM leading the WebSphere Application
Server migration tools team. His team develops several migration tools to
help with a variety of modernization scenarios including WebSphere
traditional to Liberty, Java SE and EE versions, and on-premise to cloud.
He has almost a decade of experience working with Java EE and Java
application server technology. Alex enjoys hiking and skiing and lives in
Rochester, MN.
Cindy High
Cindy is a software engineer with IBM and is the WebSphere Application
Server migration tools architect focusing on application modernization and
configuration migration. She has worked over 20 years with Java EE and
application server technology. The tools we developed over the years for
WebSphere can help you migrate your applications easier! Cindy enjoys
biking and working on stained glass projects and lives in Raleigh, NC.
MAKING THE
MOVE TO
JAVA 17
WHY
MIGRATE?
WHY MIGRATE?
Lots of new features!
Feature Lists ( JDK 11, JDK 12, JDK 13,
JDK 14, JDK 15, JDK 16, JDK 17)
WHY MIGRATE? - NEW JAVA 11 FEATURES
§ var for local variables (JEP 286)
§ New methods in classes (Collection, etc) (JEP 269)
- List<String> myList = ArrayList<String>();
- myList.add(“Georgia”);
- myList.add(“Minnesota”);
- myList.add(“Texas”);
- myList = Collections.unmodifiableList(myList);
+ var myList = List.of(“Georgia”, “Minnesota”, “Texas”);
WHY MIGRATE? - NEW JAVA 17 FEATURES
Text Blocks (JEP 378)
- String output = "Now you can moren" +
- "easily write Stringsn" +
- "that span multiple lines.";
+ String output = """
+ Now you can more
+ easily write Strings
+ that span multiple lines.""";
WHY MIGRATE? - NEW JAVA 17 FEATURES
Helpful NullPointerExceptions (JEP 358)
- Exception in thread "main" java.lang.NullPointerException
- at ...
+ Exception in thread "main" java.lang.NullPointerException:
+ Cannot invoke "String.concat(String)" because "MyClass.coffee"
+ is null
+ at ...
WHY MIGRATE? - NEW JAVA 17 FEATURES
Records (JEP 395)
- public class Car {
- private final String color;
- private final String make;
- private final String model;
-
- public Car(String color, String make, String model) {
- this.color = color;
- this.make = make;
- this.model = model;
- }
-
- // Getters for color, make, model
- // equals, toString, and hashCode methods
- }
+ public record Car (String color, String make, String model) {}
WHY MIGRATE? - NEW JAVA 17 FEATURES
Switch enhancements (JEP 361, JEP 406)
- String result = "";
- switch (day) {
- case MONDAY:
- case TUESDAY:
- case WEDNESDAY:
- case THURSDAY:
- case FRIDAY:
- result = "Weekday";
- break;
- case SATURDAY:
- case SUNDAY:
- result = "Weekend";
- break;
- default:
- throw new IllegalStateException("Unknown day: " + day);
- }
+ var result = switch (day) {
+ case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> "Weekday";
+ case SATURDAY, SUNDAY -> "Weekend";
+ default -> throw new IllegalStateException("Unknown day: " + day);
+ };
WHY MIGRATE? - NEW JAVA 17 FEATURES
§ instanceof Pattern Matching (JEP 394)
- if (sport instanceof Baseball) {
- Baseball baseball = (Baseball) sport;
- baseball.pitch();
- }
+ if (sport instanceof Baseball baseball) {
+ baseball.pitch();
+ }
WHY MIGRATE?
Security Related
Changes
¡ Crypto
¡ With Applet support removed,
Security Manager deprecated
for removal
¡ Strongly Encapsulated JDK
Internals (JEP 403)
¡ Sealed classes (JEP 409)
¡ Hidden classes (JEP 371)
WHY MIGRATE?
Library/tooling
developers need to
keep up
WHY MIGRATE?
…and of course: Java
8 and 11 will EOL
MAKING THE
MOVE TO
JAVA 17
WHAT IS MY
TARGET JAVA
VERSION?
JAVA TIMELINE
Java 11 (LTS)
Sept
2018
LTS: Long Term Support - Production
2016 2017 2018 2019 2021
2020 2022 2023 2024 2025
Java 9
Java 10
Java 12
Java 13
Java 14
Java 15
Java 16
Java 7
Sept
2021
Java 18
Java 19
Java 20
Sept
2023
Continuous testing with non-LTS releases
Java 17 (LTS) 2027
Java 21 (LTS)
Java 8 (LTS) 2026
MAKING THE
MOVE TO
JAVA 17
WHAT ARE THE
TOP MIGRATION
ISSUES FOR
JAVA 8/11 à JAVA
17+?
Top
Migration
Issues
Missing Libraries
Removed APIs
Modularity & Strong Encapsulation
Out-of-date Dependencies
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.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.adapte
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
Java 11+ (Java EE)
(Most problematic for us)
Option 1: Package your own dependencies
Option 2: Rely on the app server to provide them (Open Liberty with Java 11+)
JAX-B
JAX-WS Common Annotations
JTA
Corba
JAF
JAVA 11 +
Java Web Start
github.com/openjdk/nashorn
JavaFX
openwebstart.com
openjfx.io
JAVA 17 +
Nashorn JavaScript Engine
Java 11+: Java EE
(Checkout jakarta.ee)
Top
Migration
Issues
Missing Libraries
Removed APIs
Modularity & Strong Encapsulation
Out-of-date Dependencies
JAVA 11
§ com.sun.awt.AWTUtilities
§ com.sun.image.codec.jpeg.*
§ com.sun.java.browser.plugin2.DOM
§ com.sun.security.auth.callback.DialogCallbackHandler
§ com.sun.security.auth.module.SolarisLoginModule
§ com.sun.security.auth.module.SolarisSystem
§ 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
Removed Packages/Classes
- com.sun.security.auth.SolarisNumericGroupPrincipal principal
+ com.sun.security.auth.UnixNumericGroupPrincipal principal
JAVA 11
§ com.sun.xml.internal.bind.*
§ java.awt.dnd.peer.*
§ java.awt.peer.*
§ javax.security.auth.Policy
§ sun.misc.BASE64Decoder
§ sun.misc.BASE64Encoder
§ sun.misc.Unsafe.defineClass
§ sun.plugin.dom.DOMObject
Removed Packages/Classes
- if(button.getPeer() != null) {
+ if(button.isDisplayable()) {
JAVA 11
§ java.lang.Runtime.getLocalizedInputStream(..)
§ java.lang.Runtime.getLocalizedOutputStream(..)
§ java.lang.Runtime.runFinalizersOnExit(..)
§ java.lang.SecurityManager.checkAwtEventQueueAccess()
§ java.lang.SecurityManager.checkMemberAccess(..)
§ java.lang.SecurityManager.checkSystemClipboardAccess()
§ 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()
Removed Methods
- securityManager.checkAwtEventQueueAccess();
+ securityManager.checkPermission(permission);
JAVA 11
§ java.lang.System.runFinalizersOnExit(..)
§ java.lang.Thread.destroy()
§ java.lang.Thread.stop(java.lang.Throwable)
§ 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.util.logging.LogManager.addPropertyChangeListener(..)
§ java.util.logging.LogManager.removePropertyChangeListener(..)
Removed Methods
“Finalizers are inherently problematic, and
their use can lead to performance issues,
deadlocks, hangs, and other problematic
behavior.” - JDK-8165641
JAVA 17
§ com.sun.awt.SecurityWarning
§ java.security.acl.*
§ java.util.jar.Pack200*
§ jdk.net.SocketFlow*
§ java.rmi.activation*
Removed Packages/Classes
§ java.management.rmi.RMIConnectorServer.CREDENTIAL_TYPES
Removed Constants
JAVA 17
§ java.io.FileInputStream.finalize()
§ java.io.FileOutputStream.finalize()
§ java.lang.Runtime.traceInstructions(boolean)
§ java.lang.Runtime.traceMethodCalls(boolean)
§ java.util.zip.ZipFile.finalize()
§ java.util.zip.Inflater.finalize()
§ java.util.zip.Deflater.finalize()
§ netscape.javascript.JSObject.getWindow(Applet)
§ sun.misc.Unsafe.defineAnonymousClass(Class<?> hostClass, byte[] data, Object[] cpPatches)
§ javax.net.ssl.SSLSession.getPeerCertificateChain()**
§ java.lang.thread.countStackFrames()**
Removed Methods
§ javax.tools.ToolProvider()
§ java.lang.invoke.ConstantBootstraps()
§ java.lang.relect.Modifier()
Removed Constructors
**APIs now throw UnsupportedOperationException
- javax.net.ssl.SSLSession.getPeerCerficateChain();
+ javax.net.ssl.SSLSession.getPeerCerficates();
Top
Migration
Issues
Missing Libraries
Removed APIs
Modularity & Strong Encapsulation
Out-of-date Dependencies
§ Breaks code into modules containing packages
§ Applications must declare dependency on modules for access
§ Disruptive for Java SE application migrations
Java Platform Module
System (JPMS)
§ Use JDeps or --illegal-access=warn|debug
Use find issues in your
application
§ Use --illegal-access=permit
If migrating to Java 11
§ --add-opens launcher option
§ Add-Opens jar Manifest Attribute
If migrating to Java 17+
MODULARITY
Top
Migration
Issues
Missing Libraries
Removed APIs
Modularity & Strong Encapsulation
Out-of-date Dependencies
OUT-OF-DATE DEPENDENCIES
Libraries (ASM, Mockito, Spring, Spring Boot, etc)
Build Tools (Maven, Gradle, etc)
IDE (Eclipse, IntelliJ, VS Code, etc)
Application servers (Open Liberty, JBoss, WebLogic, etc)
My advice: take this time to upgrade your dependencies to the latest supported version. Setup automation tools.
MAKING THE
MOVE TO
JAVA 17
WHAT ABOUT
DEPRECATIONS?
KEEP AN EYE ON DEPRECATIONS
§ Java RMI Activation
§ Thread.destroy() and Thread.stop(Throwable t)
Some recently removed deprecations include:
§ Java Security Manager
§ Primitive wrapper class constructors
Some APIs currently deprecated for removal:
Full list: https://docs.oracle.com/en/java/javase/17/docs/api/deprecated-list.html#for-removal
MAKING THE
MOVE TO
JAVA 17
WHAT TOOLS CAN I
USE TO MAKE MY
MIGRATION
EASIER?
USE CONTAINERS
TO STAY UP TO
DATE
¡ Use containers to
easily keep your
Java versions up to
date
¡ This can be used to
ensure you stay up
to date with the
latest fix packs, as
well as test out
new Java versions
Application Binary
Scanner Tool
§ Download:
ibm.biz/WAMT4AppBi
naries or Maven
§ Command line tool
(free personal and
commercial use)
§ Scans an application
binary for migration
issues and produces a
report with identified
problems, solutions
and resource links
§ Documentation
JDeps
§ Command utility
shipped with JDK (run
with the target Java
version – Java 11+)
§ Migration Relevant
Option: -jdkinternals
§ Binary scanner will
recommend running
JDeps if it identifies
internal APIs
§ Documentation
Tools to automate
dependency updates
(various options)
§ Use an auto-upgrade
dependency tool to
keep your
dependencies up-to-
date
§ Configure the tools to
update based on
various settings
(frequency, etc)
§ Example: Dependabot
Eclipse Transformer
§ Transform application
binaries or source code
to use the new
package names in
Jakarta EE 9+
§ Documentation
TOOLS
DEMO
NEXT STEPS
Step 1
Evaluate your
applications
using the tools.
Step 2
Try running
your
application on
Java 17. If your
app runs
successfully,
you can skip the
next two steps.
Step 3
Debug and fix
your
application
code or build
files. Repeat
steps 1-3.
Step 4
Update your
dependencies
and tools as
needed.
Step 5
Run all your
application
tests.
Step 6
Celebrate!
HELPFUL LINKS
¡ Our blog on adding the Java 17 feature to the migration tools (written instructions on running binary
scanner): https://developer.ibm.com/tutorials/migration-to-java-11-made-easy/
¡ Binary Scanner and Eclipse IDE Plugin Source Scanner downloads: ibm.biz/wamtdownloads
§ Documentation: https://www.ibm.com/docs/wamt
¡ Link to the java17demo GitHub repo: https://github.com/alexsm82/java17demo
¡ Oracle Java SE Support Roadmap: https://www.oracle.com/java/technologies/java-se-support-
roadmap.html
¡ Java Version Almanac: https://javaalmanac.io/
¡ Andy Guibert’s blog on OpenLiberty Java 11+ support: https://openliberty.io/blog/2019/02/06/java-
11.html
¡ Blog on running the binary scanner with Maven:
https://community.ibm.com/community/user/wasdevops/blogs/alex-
motley1/2022/04/12/applications-pipelines-and-migrations
IBM SESSIONS
¡ Tuesday 10:00AM Fast JVM Startup with Checkpoint and Restore –
Tobi Ajila | JVM Platform
¡ Tuesday 2:15PM Better, Stronger, Faster Java in the Cloud - Jarek
Gawor and Tobi Ajila |Main Room (Java)
¡ 3:15 Book signing – Cloud Native Application Development with
MicroProfile and Open Liberty and Birthday Cake
¡ Wednesday 10:00AM Making the Move to Java 17 – Alex Motley and
Cindy High | Main Room (Java)
¡ Wednesday 1:15PM Relook at Microservices – Emily Jiang | Main Room
(Java)
QUESTIONS?
@alexsmotley
@CTHigh
Ad

More Related Content

What's hot (20)

From Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdfFrom Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdf
José Paumard
 
Java 17
Java 17Java 17
Java 17
Mutlu Okuducu
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
Naphachara Rattanawilai
 
Java 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgradeJava 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgrade
Simone Bordet
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
Ilias Okacha
 
Mocking in Java with Mockito
Mocking in Java with MockitoMocking in Java with Mockito
Mocking in Java with Mockito
Richard Paul
 
Java modules
Java modulesJava modules
Java modules
Rory Preddy
 
Defending against Java Deserialization Vulnerabilities
 Defending against Java Deserialization Vulnerabilities Defending against Java Deserialization Vulnerabilities
Defending against Java Deserialization Vulnerabilities
Luca Carettoni
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jiayun Zhou
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
Santosh Kumar Kar
 
Introduce yourself to java 17
Introduce yourself to java 17Introduce yourself to java 17
Introduce yourself to java 17
ankitbhandari32
 
Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring Cloud
Eberhard Wolff
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
Knoldus Inc.
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Framework
valuebound
 
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
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
Pekka Klärck
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
guest11106b
 
Rego Deep Dive
Rego Deep DiveRego Deep Dive
Rego Deep Dive
Torin Sandall
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila
 
Quarkus k8s
Quarkus   k8sQuarkus   k8s
Quarkus k8s
Georgios Andrianakis
 
From Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdfFrom Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdf
José Paumard
 
Java 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgradeJava 9/10/11 - What's new and why you should upgrade
Java 9/10/11 - What's new and why you should upgrade
Simone Bordet
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
Ilias Okacha
 
Mocking in Java with Mockito
Mocking in Java with MockitoMocking in Java with Mockito
Mocking in Java with Mockito
Richard Paul
 
Defending against Java Deserialization Vulnerabilities
 Defending against Java Deserialization Vulnerabilities Defending against Java Deserialization Vulnerabilities
Defending against Java Deserialization Vulnerabilities
Luca Carettoni
 
Introduce yourself to java 17
Introduce yourself to java 17Introduce yourself to java 17
Introduce yourself to java 17
ankitbhandari32
 
Microservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring CloudMicroservices with Java, Spring Boot and Spring Cloud
Microservices with Java, Spring Boot and Spring Cloud
Eberhard Wolff
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
Knoldus Inc.
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Framework
valuebound
 
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
 
Robot Framework Introduction
Robot Framework IntroductionRobot Framework Introduction
Robot Framework Introduction
Pekka Klärck
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
guest11106b
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila
 

Similar to Making The Move To Java 17 (JConf 2022) (20)

Jet presentation
Jet presentationJet presentation
Jet presentation
Peter Sellars
 
Full Stack Scala
Full Stack ScalaFull Stack Scala
Full Stack Scala
Ramnivas Laddad
 
JavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and EcosystemJavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and Ecosystem
Alexander Casall
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
Hirofumi Iwasaki
 
Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments
Pavel Kaminsky
 
Pre-Con Ed: Using Java to Access Your CA IDMS Databases and Applications
Pre-Con Ed: Using Java to Access Your CA IDMS Databases and ApplicationsPre-Con Ed: Using Java to Access Your CA IDMS Databases and Applications
Pre-Con Ed: Using Java to Access Your CA IDMS Databases and Applications
CA Technologies
 
Scala Frustrations
Scala FrustrationsScala Frustrations
Scala Frustrations
takezoe
 
Ten Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project ExperiencesTen Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project Experiences
Henrik Olsson
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Codemotion
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
Víctor Leonel Orozco López
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.js
Scala Italy
 
Scala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSScala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJS
Alberto Paro
 
Certifications Java
Certifications JavaCertifications Java
Certifications Java
Yannick Chartois
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Building Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with ScalaBuilding Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with Scala
WO Community
 
Moving to the Client - JavaFX and HTML5 (PowerPoint Version)
Moving to the Client - JavaFX and HTML5 (PowerPoint Version)Moving to the Client - JavaFX and HTML5 (PowerPoint Version)
Moving to the Client - JavaFX and HTML5 (PowerPoint Version)
Stephen Chin
 
Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
DaliaAboSheasha
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build system
GuardSquare
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
Mauricio "Maltron" Leal
 
Java 23 and Beyond - A Roadmap Of Innovations
Java 23 and Beyond - A Roadmap Of InnovationsJava 23 and Beyond - A Roadmap Of Innovations
Java 23 and Beyond - A Roadmap Of Innovations
Ana-Maria Mihalceanu
 
JavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and EcosystemJavaOne - The JavaFX Community and Ecosystem
JavaOne - The JavaFX Community and Ecosystem
Alexander Casall
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
Hirofumi Iwasaki
 
Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments Java 6 [Mustang] - Features and Enchantments
Java 6 [Mustang] - Features and Enchantments
Pavel Kaminsky
 
Pre-Con Ed: Using Java to Access Your CA IDMS Databases and Applications
Pre-Con Ed: Using Java to Access Your CA IDMS Databases and ApplicationsPre-Con Ed: Using Java to Access Your CA IDMS Databases and Applications
Pre-Con Ed: Using Java to Access Your CA IDMS Databases and Applications
CA Technologies
 
Scala Frustrations
Scala FrustrationsScala Frustrations
Scala Frustrations
takezoe
 
Ten Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project ExperiencesTen Man-Years of JavaFX: Real World Project Experiences
Ten Man-Years of JavaFX: Real World Project Experiences
Henrik Olsson
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Codemotion
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.js
Scala Italy
 
Scala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJSScala Italy 2015 - Hands On ScalaJS
Scala Italy 2015 - Hands On ScalaJS
Alberto Paro
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Building Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with ScalaBuilding Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with Scala
WO Community
 
Moving to the Client - JavaFX and HTML5 (PowerPoint Version)
Moving to the Client - JavaFX and HTML5 (PowerPoint Version)Moving to the Client - JavaFX and HTML5 (PowerPoint Version)
Moving to the Client - JavaFX and HTML5 (PowerPoint Version)
Stephen Chin
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build system
GuardSquare
 
Java 23 and Beyond - A Roadmap Of Innovations
Java 23 and Beyond - A Roadmap Of InnovationsJava 23 and Beyond - A Roadmap Of Innovations
Java 23 and Beyond - A Roadmap Of Innovations
Ana-Maria Mihalceanu
 
Ad

Recently uploaded (20)

Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Ad

Making The Move To Java 17 (JConf 2022)

  • 1. MAKING THE MOVE TO JAVA 17 ALEX MOTLEY @alexsmotley CINDY HIGH @CTHigh
  • 2. ABOUT US Alex Motley Alex is a software engineer at IBM leading the WebSphere Application Server migration tools team. His team develops several migration tools to help with a variety of modernization scenarios including WebSphere traditional to Liberty, Java SE and EE versions, and on-premise to cloud. He has almost a decade of experience working with Java EE and Java application server technology. Alex enjoys hiking and skiing and lives in Rochester, MN. Cindy High Cindy is a software engineer with IBM and is the WebSphere Application Server migration tools architect focusing on application modernization and configuration migration. She has worked over 20 years with Java EE and application server technology. The tools we developed over the years for WebSphere can help you migrate your applications easier! Cindy enjoys biking and working on stained glass projects and lives in Raleigh, NC.
  • 3. MAKING THE MOVE TO JAVA 17 WHY MIGRATE?
  • 4. WHY MIGRATE? Lots of new features! Feature Lists ( JDK 11, JDK 12, JDK 13, JDK 14, JDK 15, JDK 16, JDK 17)
  • 5. WHY MIGRATE? - NEW JAVA 11 FEATURES § var for local variables (JEP 286) § New methods in classes (Collection, etc) (JEP 269) - List<String> myList = ArrayList<String>(); - myList.add(“Georgia”); - myList.add(“Minnesota”); - myList.add(“Texas”); - myList = Collections.unmodifiableList(myList); + var myList = List.of(“Georgia”, “Minnesota”, “Texas”);
  • 6. WHY MIGRATE? - NEW JAVA 17 FEATURES Text Blocks (JEP 378) - String output = "Now you can moren" + - "easily write Stringsn" + - "that span multiple lines."; + String output = """ + Now you can more + easily write Strings + that span multiple lines.""";
  • 7. WHY MIGRATE? - NEW JAVA 17 FEATURES Helpful NullPointerExceptions (JEP 358) - Exception in thread "main" java.lang.NullPointerException - at ... + Exception in thread "main" java.lang.NullPointerException: + Cannot invoke "String.concat(String)" because "MyClass.coffee" + is null + at ...
  • 8. WHY MIGRATE? - NEW JAVA 17 FEATURES Records (JEP 395) - public class Car { - private final String color; - private final String make; - private final String model; - - public Car(String color, String make, String model) { - this.color = color; - this.make = make; - this.model = model; - } - - // Getters for color, make, model - // equals, toString, and hashCode methods - } + public record Car (String color, String make, String model) {}
  • 9. WHY MIGRATE? - NEW JAVA 17 FEATURES Switch enhancements (JEP 361, JEP 406) - String result = ""; - switch (day) { - case MONDAY: - case TUESDAY: - case WEDNESDAY: - case THURSDAY: - case FRIDAY: - result = "Weekday"; - break; - case SATURDAY: - case SUNDAY: - result = "Weekend"; - break; - default: - throw new IllegalStateException("Unknown day: " + day); - } + var result = switch (day) { + case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> "Weekday"; + case SATURDAY, SUNDAY -> "Weekend"; + default -> throw new IllegalStateException("Unknown day: " + day); + };
  • 10. WHY MIGRATE? - NEW JAVA 17 FEATURES § instanceof Pattern Matching (JEP 394) - if (sport instanceof Baseball) { - Baseball baseball = (Baseball) sport; - baseball.pitch(); - } + if (sport instanceof Baseball baseball) { + baseball.pitch(); + }
  • 11. WHY MIGRATE? Security Related Changes ¡ Crypto ¡ With Applet support removed, Security Manager deprecated for removal ¡ Strongly Encapsulated JDK Internals (JEP 403) ¡ Sealed classes (JEP 409) ¡ Hidden classes (JEP 371)
  • 13. WHY MIGRATE? …and of course: Java 8 and 11 will EOL
  • 14. MAKING THE MOVE TO JAVA 17 WHAT IS MY TARGET JAVA VERSION?
  • 15. JAVA TIMELINE Java 11 (LTS) Sept 2018 LTS: Long Term Support - Production 2016 2017 2018 2019 2021 2020 2022 2023 2024 2025 Java 9 Java 10 Java 12 Java 13 Java 14 Java 15 Java 16 Java 7 Sept 2021 Java 18 Java 19 Java 20 Sept 2023 Continuous testing with non-LTS releases Java 17 (LTS) 2027 Java 21 (LTS) Java 8 (LTS) 2026
  • 16. MAKING THE MOVE TO JAVA 17 WHAT ARE THE TOP MIGRATION ISSUES FOR JAVA 8/11 à JAVA 17+?
  • 17. Top Migration Issues Missing Libraries Removed APIs Modularity & Strong Encapsulation Out-of-date Dependencies
  • 18. 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.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.adapte 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 Java 11+ (Java EE) (Most problematic for us) Option 1: Package your own dependencies Option 2: Rely on the app server to provide them (Open Liberty with Java 11+) JAX-B JAX-WS Common Annotations JTA Corba JAF
  • 19. JAVA 11 + Java Web Start github.com/openjdk/nashorn JavaFX openwebstart.com openjfx.io JAVA 17 + Nashorn JavaScript Engine
  • 20. Java 11+: Java EE (Checkout jakarta.ee)
  • 21. Top Migration Issues Missing Libraries Removed APIs Modularity & Strong Encapsulation Out-of-date Dependencies
  • 22. JAVA 11 § com.sun.awt.AWTUtilities § com.sun.image.codec.jpeg.* § com.sun.java.browser.plugin2.DOM § com.sun.security.auth.callback.DialogCallbackHandler § com.sun.security.auth.module.SolarisLoginModule § com.sun.security.auth.module.SolarisSystem § 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 Removed Packages/Classes - com.sun.security.auth.SolarisNumericGroupPrincipal principal + com.sun.security.auth.UnixNumericGroupPrincipal principal
  • 23. JAVA 11 § com.sun.xml.internal.bind.* § java.awt.dnd.peer.* § java.awt.peer.* § javax.security.auth.Policy § sun.misc.BASE64Decoder § sun.misc.BASE64Encoder § sun.misc.Unsafe.defineClass § sun.plugin.dom.DOMObject Removed Packages/Classes - if(button.getPeer() != null) { + if(button.isDisplayable()) {
  • 24. JAVA 11 § java.lang.Runtime.getLocalizedInputStream(..) § java.lang.Runtime.getLocalizedOutputStream(..) § java.lang.Runtime.runFinalizersOnExit(..) § java.lang.SecurityManager.checkAwtEventQueueAccess() § java.lang.SecurityManager.checkMemberAccess(..) § java.lang.SecurityManager.checkSystemClipboardAccess() § 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() Removed Methods - securityManager.checkAwtEventQueueAccess(); + securityManager.checkPermission(permission);
  • 25. JAVA 11 § java.lang.System.runFinalizersOnExit(..) § java.lang.Thread.destroy() § java.lang.Thread.stop(java.lang.Throwable) § 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.util.logging.LogManager.addPropertyChangeListener(..) § java.util.logging.LogManager.removePropertyChangeListener(..) Removed Methods “Finalizers are inherently problematic, and their use can lead to performance issues, deadlocks, hangs, and other problematic behavior.” - JDK-8165641
  • 26. JAVA 17 § com.sun.awt.SecurityWarning § java.security.acl.* § java.util.jar.Pack200* § jdk.net.SocketFlow* § java.rmi.activation* Removed Packages/Classes § java.management.rmi.RMIConnectorServer.CREDENTIAL_TYPES Removed Constants
  • 27. JAVA 17 § java.io.FileInputStream.finalize() § java.io.FileOutputStream.finalize() § java.lang.Runtime.traceInstructions(boolean) § java.lang.Runtime.traceMethodCalls(boolean) § java.util.zip.ZipFile.finalize() § java.util.zip.Inflater.finalize() § java.util.zip.Deflater.finalize() § netscape.javascript.JSObject.getWindow(Applet) § sun.misc.Unsafe.defineAnonymousClass(Class<?> hostClass, byte[] data, Object[] cpPatches) § javax.net.ssl.SSLSession.getPeerCertificateChain()** § java.lang.thread.countStackFrames()** Removed Methods § javax.tools.ToolProvider() § java.lang.invoke.ConstantBootstraps() § java.lang.relect.Modifier() Removed Constructors **APIs now throw UnsupportedOperationException - javax.net.ssl.SSLSession.getPeerCerficateChain(); + javax.net.ssl.SSLSession.getPeerCerficates();
  • 28. Top Migration Issues Missing Libraries Removed APIs Modularity & Strong Encapsulation Out-of-date Dependencies
  • 29. § Breaks code into modules containing packages § Applications must declare dependency on modules for access § Disruptive for Java SE application migrations Java Platform Module System (JPMS) § Use JDeps or --illegal-access=warn|debug Use find issues in your application § Use --illegal-access=permit If migrating to Java 11 § --add-opens launcher option § Add-Opens jar Manifest Attribute If migrating to Java 17+ MODULARITY
  • 30. Top Migration Issues Missing Libraries Removed APIs Modularity & Strong Encapsulation Out-of-date Dependencies
  • 31. OUT-OF-DATE DEPENDENCIES Libraries (ASM, Mockito, Spring, Spring Boot, etc) Build Tools (Maven, Gradle, etc) IDE (Eclipse, IntelliJ, VS Code, etc) Application servers (Open Liberty, JBoss, WebLogic, etc) My advice: take this time to upgrade your dependencies to the latest supported version. Setup automation tools.
  • 32. MAKING THE MOVE TO JAVA 17 WHAT ABOUT DEPRECATIONS?
  • 33. KEEP AN EYE ON DEPRECATIONS § Java RMI Activation § Thread.destroy() and Thread.stop(Throwable t) Some recently removed deprecations include: § Java Security Manager § Primitive wrapper class constructors Some APIs currently deprecated for removal: Full list: https://docs.oracle.com/en/java/javase/17/docs/api/deprecated-list.html#for-removal
  • 34. MAKING THE MOVE TO JAVA 17 WHAT TOOLS CAN I USE TO MAKE MY MIGRATION EASIER?
  • 35. USE CONTAINERS TO STAY UP TO DATE ¡ Use containers to easily keep your Java versions up to date ¡ This can be used to ensure you stay up to date with the latest fix packs, as well as test out new Java versions
  • 36. Application Binary Scanner Tool § Download: ibm.biz/WAMT4AppBi naries or Maven § Command line tool (free personal and commercial use) § Scans an application binary for migration issues and produces a report with identified problems, solutions and resource links § Documentation JDeps § Command utility shipped with JDK (run with the target Java version – Java 11+) § Migration Relevant Option: -jdkinternals § Binary scanner will recommend running JDeps if it identifies internal APIs § Documentation Tools to automate dependency updates (various options) § Use an auto-upgrade dependency tool to keep your dependencies up-to- date § Configure the tools to update based on various settings (frequency, etc) § Example: Dependabot Eclipse Transformer § Transform application binaries or source code to use the new package names in Jakarta EE 9+ § Documentation TOOLS
  • 37. DEMO
  • 38. NEXT STEPS Step 1 Evaluate your applications using the tools. Step 2 Try running your application on Java 17. If your app runs successfully, you can skip the next two steps. Step 3 Debug and fix your application code or build files. Repeat steps 1-3. Step 4 Update your dependencies and tools as needed. Step 5 Run all your application tests. Step 6 Celebrate!
  • 39. HELPFUL LINKS ¡ Our blog on adding the Java 17 feature to the migration tools (written instructions on running binary scanner): https://developer.ibm.com/tutorials/migration-to-java-11-made-easy/ ¡ Binary Scanner and Eclipse IDE Plugin Source Scanner downloads: ibm.biz/wamtdownloads § Documentation: https://www.ibm.com/docs/wamt ¡ Link to the java17demo GitHub repo: https://github.com/alexsm82/java17demo ¡ Oracle Java SE Support Roadmap: https://www.oracle.com/java/technologies/java-se-support- roadmap.html ¡ Java Version Almanac: https://javaalmanac.io/ ¡ Andy Guibert’s blog on OpenLiberty Java 11+ support: https://openliberty.io/blog/2019/02/06/java- 11.html ¡ Blog on running the binary scanner with Maven: https://community.ibm.com/community/user/wasdevops/blogs/alex- motley1/2022/04/12/applications-pipelines-and-migrations
  • 40. IBM SESSIONS ¡ Tuesday 10:00AM Fast JVM Startup with Checkpoint and Restore – Tobi Ajila | JVM Platform ¡ Tuesday 2:15PM Better, Stronger, Faster Java in the Cloud - Jarek Gawor and Tobi Ajila |Main Room (Java) ¡ 3:15 Book signing – Cloud Native Application Development with MicroProfile and Open Liberty and Birthday Cake ¡ Wednesday 10:00AM Making the Move to Java 17 – Alex Motley and Cindy High | Main Room (Java) ¡ Wednesday 1:15PM Relook at Microservices – Emily Jiang | Main Room (Java)