Java Magazine, September/October 2017
ORACLE COM JAVAMAGAZINE SEPTEMBER OCTOBER 2017 29 java 9 The output begins with the modules name and location The rest of the output shows that the module requires the standard module java base and contains the package com deitel welcome Although the module contains this package it is not exported Therefore its contents cannot be used by other modules The module declaration for this example explicitly required java base so the preceding output included requires java base If the module declaration had implicitly required java base then the listing instead would have included requires java base mandated There is no mandated module directive it is included in the describe module output simply to indicate that all modules depend on java base Running an app from a modules exploded folders To run the Welcome app from the modules exploded folders use the following command from the WelcomeApp folder again macOS Linux users should replace with java module path mods module com deitel welcome com deitel welcome Welcome The module path option specifies where the module is located in this case the mods folder The module option specifies the module name and the fully qualified class name of the apps entry point that is a class containing main The program executes and displays Welcome to the Java Platform Module System In the preceding command module path can be abbreviated as p and module can be abbreviated as m
You must have JavaScript enabled to view digital editions.