Product with nested tests

Layout on file system

Steps for defining a corresponding project

  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.

    Layout 41

  4. On the next page, Select "Product1" source folder.

    Click Link Additional Source to Project button Link Additional Source to Project in view bar.

    Layout 42

  5. In Link Additional Source click Browse.... and choose the D:\Product1\JavaSourceFiles directory.

    Type "src" in the Folder name field.

    Layout 31

  6. Click OK to close the dialog.

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

    Layout 12

  8. Your project source setup now looks as follows:

    Layout 32

  9. Click Finish.
  10. Edit project "Product1"properties and select Java Builder Path page.

    On Source tab, click Add Folder....

    Layout 33

  11. Expand "Product1", then "src" and select "tests".

    Layout 34

  12. Click OK to close the dialog. You get an information dialog saying that exclusion filters have been added. Click OK.

  13. Your project setup now looks as follows:

    Layout 35

  14. Click OK.

  15. You now have a Java project with a "src" folder and a "tests" folder which contain respectively the D:\Product1\JavaSourceFiles directory and the D:\Product1\JavaSourceFiles\tests directory.

    Layout 36

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