Products sharing a common source framework
The Java source files for two products require a common framework:
- 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 "JavaSourceFiles" in the Folder name field.
-
Click Advanced. Check Link to folder in the file system.
Click Browse.... and choose the "JavaSourceFiles" directory in "Product1".

- Click OK twice to close the two dialogs.
-
Click Add Folder....
-
Click Create New Folder.... Type "src-common" in the Folder name field.
-
Click Advanced. Check Link to folder in the file system.
Click Browse.... and choose the "JavaSourceFiles" directory in "CommonFramework".

- Click OK twice to close the two dialogs.
-
Type "Product1/bin" in the Default output folder field.

- Click Finish.
- Repeat these steps for "Product2".
-
You now have two Java projects which respectively contain the sources of "Product1" and "Product2"
and which are using the sources of "CommonFramework".

Note: Files in "src-common" are shared. So editing "Common.java" in "Product1"
will modify "Common.java" in "Product2". However they are compiled in the context of their
respective projects. Two "Common.class" files will be generated; one for each project. If the two projects have
different compiler options, then different errors could be reported on each "Common.java" file.
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