Nesting Projects
Projects can be included (nested) as elements in other projects. Nesting projects is useful when you have an applet or standalone program that imports packages you wrote. You create a project for each package, as well as the applet or standalone program. To make sure the imported packages are always up to date, you include the package projects in the applet or standalone program project.
To include a project in another project:
- Make the project in which you want to include other projects the current project.
- Click the Project Manager control

on the WorkShop tool bar.
- Click the Add button under the Included Projects list.
- In the Project field, type the name of the project you want to include.
Clicking the ellipsis button opens a file chooser in which you can select the name of a project.
- Click OK.
The name of the included project appears in the list. Repeat steps three through 5 if you want to include additional projects. The WorkShop builds nested projects in the order they are listed in the parent project. To change the order, use the Move Up and Move Down buttons.
- Click Apply.
Example
Suppose you have a project that has many subdirectories, and each subdirectory has .java files:
- /john/myproj/main--contains Main.java and several other .java files
- /john/myproj/main/readers--contains several .java files
/john/myproj/main/writers--contains several .java files
- /john/myproj/main/utils--contains several .java files
Both the readers and writers directories have .java files that import from utils. To set up the project:
- Create a project named main in the main directory
- Create a project named readers in the readers directory
- Create a project named writers in the writers directory
- Create a project named utils in the utils directory
- Make the main project the current project and open the Project Manager.
- 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 they are listed.
See also:
- General Tab