# Product with nested tests

### Layout on file system

- The Java source files for a product are laid out in a package directory.
- Source files of tests are laid out in a nested package directory.

### 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.

4. On the next page, Select "Product1" source folder and click Add Folder....

5. In New Source Folder dialog, type "src" in the Folder name field.

   Click Advanced. Check Link to folder in the file system.

   Click Browse.... and choose the "JavaSourceFiles" directory.

6. Click OK to close the dialog.

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

8. Click Add Folder....
9. Expand "Product1", then "src" and select "tests".

10. Click OK. You get an information dialog saying that exclusion filters have been added. Click OK.

11. Your project source setup now looks as follows:

12. Click Finish.
13. You now have a Java project with a "src" folder and a "tests" folder which contain respectively the "JavaSourceFiles" directory and the "tests" directory.

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