Creating Subprojects
Projects can include subprojects. Subproject's are useful when you have a program that adds packages. You can create a project for the program and a subproject for each package.
Subprojects are created using the same Create Project wizard that you use when you create a project.
To create a subproject within a project:
- Click the Project's button

on the Java WorkShop main toolbar.
- In the project manager, double-click on the project name in which you want to include a subproject.
- Choose File -> New -> Subproject.
The Create Project wizard is displayed.
- Complete the Create Project wizard using your subproject information.
Example
Suppose you want to create a project with many subprojects, each of which has .java files:
- /tina/myproj/main--contains Main.java and several other .java files
- /tina/myproj/main/readers--contains several .java files
- /tina/myproj/main/writers--contains several .java files
- /tina/myproj/main/utils--contains several .java files
Both the readers and writers subprojects have .java files that are added from utils.
To set up the example:
- Create a project named Main in the main directory.
- Create a subproject named readers in the readers directory.
- Create a subproject named writers in the writers directory.
- Create a subproject named utils in the utils directory.
- Make the Main project the current project and choose Project -> Edit.
- In the Included Projects field in the General tab, list the projects as
follows:
- utils
- readers
- writers
When you build the main project, the included projects are built in the order in which they are listed.
See also:
- Using the Create Project Wizard
- Running a Project
- Building Projects