Java Magazine, Sept/Oct 2017
ORACLE COM JAVAMAGAZINE SEPTEMBER OCTOBER 2017 25 java 9 After covering these basics we also demonstrate packaging the Welcome app in a modular JAR file running the app from that JAR file Welcome apps structure The app we present in this section consists of two java files Welcome java contains the Welcome app class and module info java contains the module declaration By convention a modularized app has the following folder structure AppFolder src ModuleNameFolder PackageFolders JavaSourceCodeFiles module info java For our app which will be defined in the package com deitel welcome the folder structure is shown in Figure 1 The src folder stores all of the apps source code It contains the modules root folder which has the modules name com deitel welcome well discuss module naming in a moment The modules root folder contains nested folders representing the packages directory structure com deitel welcome which corresponds to the package com deitel welcome This folder contains Welcome java The modules root folder contains the required module declaration module info java Module naming conventions Like package names module names must be unique To ensure unique package names you typically begin the name with your organizations Internet domain name in reverse order Our domain name is deitel com so we begin our package names with com deitel By convention module names also use the reverse domain name convention Figure 1 Folder structure for the Welcome app
You must have JavaScript enabled to view digital editions.