O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modularizing banking.util

As this doesn't depend on other non-module code we can directly convert this into a module by following the steps:

  1. Create a new folder banking.util under src. This will contain the code for banking.util module.
  2. Create module-info.java under the directory chp3/7_top_down_migration_after/src/banking.util which contains the following:
        module banking.util{          exports com.packt.banking;         }
  1. Copy the directory chp3/7_top_down_migration_before/banking_util/src/com and all the code under it to chp3/7_top_down_migration_after/src/banking.util

 

  1. Compile the modules:
      #On Linux      javac -d mods --module-path mlib --module-source-path src $(find       src -name *.java)      #On Windows      javac -d ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required