Overlapping products in a common source tree
The Java source files for the company's products are all held in a single package directory like this:
- Select the menu item File > New > Project.... to open the New Project wizard.
-
On the left pane of the first wizard page, select Java, and on the right pane, select Java Project.
Click Next.
- On the next page, type "Product1" in the Project name field. Click Next.
-
Select "Product1" source folder and click Edit....
-
Click Create New Folder.... Type "src" in the Folder name field.
-
Click Advanced. Check Link to folder in the file system.
Click Browse.... and choose the "AllJavaSourceFiles" directory.

- Click OK twice to close the two dialogs.
- Expand the "src" source folder. Select Exclusion filters and click Edit....
-
Click Add.... Type "com/xyz/product2/" in the Add Exclusion Pattern dialog.
- Click OK twice to close the two dialogs.
-
Type "Product1/bin" in the Default output folder field.

- Click Finish.
- Repeat these steps for "Product2", excluding "com/xyz/product1/" instead.
-
You now have two Java projects which respectively contain the sources of "product1" and "product2".

Java projects
Java views
Working with build paths
Creating a new Java project
Creating a Java project with source folders
Creating a new source folder
Using the Package Explorer
New Java Project Wizard
Package Explorer View