Sibling products in a common source tree

Layout on file system

Steps for defining corresponding projects

  1. Open a Java perspective, select the menu item File > New > Project.... to open the New Project wizard.
  2. Select Java project in the list of wizards and click Next.
  3. On the next page, type "Product1" in the Project name field. Click Next.
  4. On the next page, Select "Product1" source folder and click Add Folder....

    Source and output folders page

  5. In New Source Folder dialog, 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".

    New linked folder

  6. Click OK to close the dialog.
  7. Click Yes in confirmation dialog to have "Product1/bin" as default output folder.

    Default output folder confirmation

  8. Your project source setup now looks as follows:

    Source and output page after setting output

  9. Click Finish.
  10. Repeat these steps for "Product2".
  11. You now have two Java projects which respectively contain the sources of "Product1" and "Product2".

    Java perspective

Related concepts

Java projects
Java views

Related tasks

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

Related reference

New Java Project Wizard
Package Explorer View

Legal notices