# 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. Click Window > Open Perspective > Other... > Java to change to the Java perspective.

2. Click File > New > Other... > Java Project to open the New Java Project wizard.

3. Type "Product1" in the Project name field. Click Next.

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

   Click Link additional source link in Details pane or button in view bar.

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

   Type "src" in the Folder name field.

6. Click Finish to validate and close the dialog.

7. Expand the "src" source folder. Select the empty package "tests" and set it as source folder using either Use as Source Folder popup-menu item or button in view bar.

8. Your project source setup now looks as follows:

9. Click Finish.
10. You now have a Java project with two source folders: "src" and "src/tests" which contain respectively the `D:\Product1\JavaSourceFiles` directory and the `D:\Product1\JavaSourceFiles\tests` directory.

### Related concepts

Java projects
Java views

### Related references

New Java Project Wizard
Package Explorer View