Migrating from Java 8 to Java 11 | Java 11 New Features & Skills

Gain the Skills Required to Seamlessly Transition to Java 11, Elevate your Development Skills, Maximize Perfomance & More

TT2133

Introductory and Beyond

2 Days

Course Overview

Overview

Migrating from Java 8 to Java 11 is a one to two day, fast paced workshop-style course designed to get you quickly up to speed with the skills and best practices required to transition your Java 8 applications to Java 11, taking advantage of Java 11’s powerful features and capabilities. This immersive course will guide you through a series of key topics and skills, including updates from Project Coin, innovative String methods in Java 11, and local-variable type inference. You’ll also delve into the powerful updates to collections and streams, ensuring you have a thorough understanding of the latest enhancements.

The course is designed to empower you to make a seamless transition to Java 11, by providing an in-depth exploration of the Java Module System (Jigsaw). You'll learn the rationale behind Jigsaw, grasp the fundamentals of the module system, and discover how to define application modules, dependencies, and exports. With a focus on practical application, our hands-on labs will guide you through the process of migrating a Java 8 application to Java 11, replacing removed libraries, and overcoming common challenges. You'll leave the course armed with the skills required to confidently migrate your Java 8 applications to Java 11, leverage the latest language features and enhancements, and optimize your code for improved performance and maintainability.

NOTE: This course runs as a two day class for public offerings, but can be taught as a one or two day class for private classes or group training. Please inquire for details.

 

Learning Objectives

This course is approximately 50% hands-on, combining expert lecture, real-world demonstrations and group discussions with machine-based practical programming labs and exercises. Our engaging instructors and mentors are highly experienced practitioners who bring years of current "on-the-job" experience into every classroom. Working in a hands-on learning environment, guided by our expert team, you’ll learn to:

  • Develop modular applications in Java
  • Migrate existing Java applications to the Java 11 platform
  • Improve implementations already using Java 8's Stream API by utilizing the methods new in Java 11
  • Understand how the implementation of the String class has been updated to decrease the memory footprint
  • Explore specific Java 11 features covered including: The Java Module System (project Jigsaw), Updated try-with-resources, Performance enhancements since Java 9, Updates to Collection and Stream API, Using the Local Variable Types, Updates made to the String API

Hands-on Migration: Gain practical experience migrating and application, either during or after class. You’ll explore the steps required to take an existing Java 8 application written using JUnit, Project Lombok, JAXB and JavaFX and update it to run on Java 11. You’ll learn to navigate some of the commong challenges developers face while migrating projects.

Throughout the project you’ll:

  • Take the existing application and make it run on Java without modifying the source code
  • Update the application,  converting it to a proper Java Module
  • Update the libraries to the latest Jakarta version
  • Utilize the ServiceLoader mechanism to decouple the components
  • Use JLink to build a custom runtime environment

Course Objectives

Learning Objectives

This course is approximately 50% hands-on, combining expert lecture, real-world demonstrations and group discussions with machine-based practical programming labs and exercises. Our engaging instructors and mentors are highly experienced practitioners who bring years of current "on-the-job" experience into every classroom. Working in a hands-on learning environment, guided by our expert team, you’ll learn to:

  • Develop modular applications in Java
  • Migrate existing Java applications to the Java 11 platform
  • Improve implementations already using Java 8's Stream API by utilizing the methods new in Java 11
  • Understand how the implementation of the String class has been updated to decrease the memory footprint
  • Explore specific Java 11 features covered including: The Java Module System (project Jigsaw), Updated try-with-resources, Performance enhancements since Java 9, Updates to Collection and Stream API, Using the Local Variable Types, Updates made to the String API

Hands-on Migration: Gain practical experience migrating and application, either during or after class. You’ll explore the steps required to take an existing Java 8 application written using JUnit, Project Lombok, JAXB and JavaFX and update it to run on Java 11. You’ll learn to navigate some of the commong challenges developers face while migrating projects.

Throughout the project you’ll:

  • Take the existing application and make it run on Java without modifying the source code
  • Update the application,  converting it to a proper Java Module
  • Update the libraries to the latest Jakarta version
  • Utilize the ServiceLoader mechanism to decouple the components
  • Use JLink to build a custom runtime environment

Course Prerequisites

Audience, Pre-Requisites & Learning Paths

This is an intermediate- level Java programming course, designed for experienced Java 8 developers who wish to get up and running with Java 11 immediately.  Attendees should have a working knowledge of developing Java 8 applications.

Related Courses / Trivera’s Java Developer Suite

This is subset list of some of the core courses in our catalog. Please visit the website for a complete list of offerings.

  • TT2000          Getting Started with Programming, OO and Java Basic for Non-Developers
  • TT2104          Fast Track to Core Java Programming for Experience OO Developers (such as C++, C#) (4 days)
  • TT2120          Basic Java Programming for Developers New to OO (such a C, Mainframe)
  • TT2133          Migrating to Java 11
  • TT2135          Migrating to Java 17
  • TT2211          Intermediate Java Developer Workshop
  • TT2023          Java Developer Journey – Career Experience Program (for core Java, full stack and more) (multi-week)

Course Agenda

Please note that course agenda, topics and labs are subject to adjust during live delivery in response to student skill level, interests and participation.

Detailed Course Topics / Agenda

Day 1

Java 11: What’s New in Java 11

  1. Milling Project Coin
  • Changes made to the language since Java 6
  • Multi-catch
  • Using effectively final variables in try-with-resources
  • Suppressed exceptions
  • Binary literals
  • Reserved underscore
  • Type inference in anonymous classes
  • @SafeVargs (updates in Java 9)
  • Default and static methods in interfaces
  • Private methods in interfaces
  • Tutorial: Importing Exercises into IntelliJ 2022 (Community Edition)
  • Lab: Try-With-Resources
  1. Using Strings in Java 11
  • Working with Strings
  • Discuss the definition of whitespace in Java
  • Introduce the new strip() methods of the String class
  • The isBlank() and repeat() methods introduced in Java 11
  • Using the lines() method to construct a Stream instance using a String
  • Compact strings
  • String deduplication
  1. Local-Variable Type Inference
  • Explain type inference
  • Infering types of local variables
  • The var reserved type name
  • Benefits of using var
  • Backward compatibilty
  • Lab: Using Local-Variable Type Inference
  1. Collection and Stream Updates
  • Factory methods for Immutable Collection types
  • The takeWhile and dropWhile methods
  • The Stream Iterate and ofNullable methods
  • Lab: Stream Updates

The Java Module system (Jigsaw)

  1. Why JigSaw?
  • Problems with Classpath
  • Encapsulation and the public access modifier
  • Application memory footprint
  • Java 8’s compact profile
  • Using internal JDK APIs
  1. Introduction to the Module System
  • Introduce Project Jigsaw
  • Classpath and Encapsulation
  • The JDK internal APIs
  • Java 9 Platform modules
  • Defining application modules
  • Define module dependencies
  • Implicit dependencies
  • Implied Readability
  • Exporting packages
  • Lab: Defining Modules
  1. The Module Descriptor
  • Define module requirements
  • Explain qualified exports
  • Open modules for reflection
  • Use ServiceLoader
  • The provides and uses keywords
  • Lab: Modules and the ServiceLoader
  • Lab: Using Reflection on modules (optional)
  1. Migrating an Application
  • Migrating a java 8 application to Java 11
  • Replacing libraries removed from the Java Standard Edition
  • Explore the challenges

Evening Review / Homework

  • Lab: Flight Application (approx 30 minutes)
  • Lab: Migrating from Java 8 to Java 11 (approx 45 minutes)
  • Lab: Migrating from Java 8 to Java 11 (part 2) (approx 30 minutes)
  • Lab: Migrating from Java 8 to Java 11 (part 3) (approx 45 minutes)

Bonus Topics: Time Permitting (Day Two in Two day edition)

  1. Java 11: Removed Features and Options
  • Provide an overview of tools and APIs removed
  • Java EE modules are no longer available in Java 11
  1. Java 9 Concurrency Updates
  • Brief overview of Concurrency in Java
  • Overview of CompletableFuture (Java 8)
  • Subclassing the CompletableFuture
  • The default Executor
  • New Factory methods
  • Dealing with time-outs
  • Lab: Completables (optional)

Course Materials

Each student will receive a Student Guide with course notes, code samples, software tutorials, step-by-step written lab instructions, diagrams and related reference materials and links (as applicable). Students will also receive the project files (or code, if applicable) and solutions required for the hands-on work.

Hands-on Setup Made Simple! Our dedicated tech team will work with you to ensure your student machines and learning environment is setup, tested and ready to go well in advance of the course delivery date, ensuring a smooth start to class and seamless hands-on experience for your students. We offer several flexible student machine setup options including guided manual set up for simple installation directly on student machines, or cloud based / remote hosted lab solutions where students can log in to a complete separate lab environment minus any installations, or we can supply complete turn-key, pre-loaded equipment to bring ready-to-go student machines to your students or in-person facility.  Please inquire for details.

Raise the bar for advancing technology skills

Attend a Class!

Live scheduled classes are listed below or browse our full course catalog anytime

Special Offers

We regulary offer discounts for individuals, groups and corporate teams. Contact us

Custom Team Training

Check out custom training solutions planned around your unique needs and skills.

EveryCourse Extras

Exclusive materials, ongoing support and a free live course refresh with every class.

Mix, Match & Master!
2FOR1: Two Courses, One Price!

Enroll in *any* two public courses (for 2023 *OR* 2024 dates!) by December 31, for one price!  Learn something new, or share the promo!

Click for Details & Additional Offers

Learn. Explore. Advance!

Extend your training investment! Recorded sessions, free re-sits and after course support included with Every Course
Trivera MiniCamps
Gain the skills you need with less time in the classroom with our short course, live-online hands-on events
Trivera QuickSkills: Free Courses and Webinars
Training on us! Keep your skills current with free live events, courses & webinars
Trivera AfterCourse: Coaching and Support
Expert level after-training support to help organizations put new training skills into practice on the job

The voices of our customers speak volumes

Special Offers
Limited Offer for most courses.

SAVE 50%

Learn More