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 math.util

  1. Create a new folder math.util under src. This will contain the code for math.util module.
  2. Create module-info.java under the directory chp3/7_top_down_migration_after/src/math.util which contains the following:
        module math.util{           exports com.packt.math;         }
  1. Copy the directory chp3/7_top_down_migration_before/math_util/src/com and all the code under it to chp3/7_top_down_migration_after/src/math.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 mods --module-path mlib --module-source-path src       src\math.util\module-info.java       src\math.util\com\packt\math\MathUtil.java
  1. Create ...

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