# Nesting resources in output directory

### Layout on file system

- The Java source files for a product are laid out both in `sources` and `deliverables` directories.
- All Java class files are laid out in `deliverables` directory.
- Project needs to use some libraries located in `deliverables/libraries` 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 "Product" in the Project name field. Click Next.

4. On the next page, Type "Product/deliverables" in Default output folder field.

   Select "Product1" source folder.

   Click Link Additional Source to Project button in view bar.

5. In Link Additional Source click Browse.... and choose the `D:\Product\sources` directory.

6. Click OK to close the dialog.

7. Click OK in confirmation dialog to remove the project as source folder.

8. Repeat previous steps to create source folder "deliverables" linked to `D:\Product\deliverables` directory.

   Click Finish.

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

   Expand "Product/deliverables", select Excluded and click Edit....

10. Click Add... in Exclusion patterns part of the Inclusion and Exclusion Patterns dialog.

11. Type "libraries/" in Add Exclusion Pattern dialog and click OK to validate and close the dialog.

12. Click OK twice to close dialogs.

13. Your project source setup now looks as follows:

14. Select Libraries tab.

    Click on Add JARs....

15. Expand "Product" hierarchy to select jar files in "libraries" directory

    Click OK.

16. You now have a Java project with a "sources" folder and an output folder which contains nested library resources.

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