To Examples Page
Creating a Project with Multiple Modules
IntelliJ directions for creating project with multiple modules (see the Greeter Example).
- Open the IntelliJ IDE.
- In the Welcome to IntelliJ IDEA Dialog, click on the Create New Project
Link.
- Create a Java Project named Greeter:
- Add a module named Greeter1 to the Greeter Project:
- Right click on the project name Greeter1. Select New >> Module.
- In the New Module Dialog, click Next. Enter the Module name as
Greeter1. Click Finish.
- Add a class named Main to the Greeter1 Module:
- Right click on the src folder under the Greeter1 Module. Select New
>> Java Class. In the Create New Class Dialog,
enter Main as the name of the class. Replace the source code of this class with the code in Main.java.
- Create three more modules and classes for these modules according to this table:
- Run a main method in any of the modules by clicking the green arrow to the left of its header.