/examples

Contains all code examples from the Java 9 Modularity book, organized by chapter.

Primary LanguageJava

Java 9 Modularity cover

This repository contains all the example code from the Java 9 Modularity book. The examples are grouped by chapter in the book:

  1. Modules and Modular JDK
  2. Working with Modules
  3. Services
  4. Modularity Patterns
  5. Advanced Modularity Patterns
  6. Migration Without Modules
  7. Migration to Modules
  8. Migration Case Study: Spring and Hibernate
  9. Library Migration
  10. Build Tools and IDEs
  11. Testing Modules

Most examples contain a run.sh file to compile and run the example. The scripts are tested on Mac OS and Linux. Windows users can use the Linux Subsystem for Windows, or use Cygwin to run the scripts. Some examples demonstrate errors, which means that compiling or running them may fail on purpose. A README is available in each example directory to explain the example.