August 2017
Beginner
298 pages
7h 26m
English
With this knowledge of automatic modules, let's resume the migration of the shopping bag application. We need to get the commons collection JAR out of the classpath and made into an automatic module. To do that, rather than moving the JAR, we'll just supply the --module-path argument with the path to the JAR (the lib folder), thereby making the JAR file in the module path. (Unlike the classpath, you don't have to specify the file name. Just the folder location will do.)
Here's the compiler command:
$ javac --module-source-path src --module-path lib -d out $(find . - name '*.java')
We will get the following different errors now:
./src/packt.shoppingbag/com/packt/shoppingbag/app/App.java:3: error: package java.util.logging ...
Read now
Unlock full access