Java Magazine, September/October 2017
ORACLE COM JAVAMAGAZINE SEPTEMBER OCTOBER 2017 27 java 9 class System is in package java lang from the java base module System out println Welcome to the Java Platform Module System Module declaration module info java The following listing contains the module declaration for the com deitel welcome module module info java Module declaration for the com deitel welcome module module com deitel welcome requires java base implicit in all modules so can be omitted Again the module declaration begins with the keyword module followed by the modules name and braces that enclose the declarations body This module declaration contains a requires module directive indicating that the app depends on types defined in module java base Actually all modules depend on java base so the requires module directive is implicit in all module declarations and may be omitted as in module com deitel welcome Compiling a module To compile the Welcome apps module open a command window use the cd command to change to the WelcomeApp folder then type javac d mods com deitel welcome src com deitel welcome module info java src com deitel welcome com deitel welcome Welcome java Note The symbol is the Microsoft Windows line continuation character The above command could be entered on a single command line without the line continuation characters Linux
You must have JavaScript enabled to view digital editions.