Product with nested tests

The Java source files for a product are laid out in package directory like this:

Layout 3

  1. Select the menu item File > New > Project.... to open the New Project wizard.
  2. On the left pane of the first wizard page, select Java, and on the right pane, select Java Project. Click Next.
  3. On the next page, type "Product1" in the Project name field. Click Next.
  4. Select "Product1" source folder and click Edit....
  5. Click Create New Folder.... Type "src" in the Folder name field.
  6. Click Advanced. Check Link to folder in the file system. Click Browse.... and choose the "JavaSourceFiles" directory.

    New linked folder

  7. Click OK twice to close the two dialogs.
  8. Type "Product1/bin" in the Default output folder field.

    Source and output page after setting output

  9. Click Add Folder....
  10. Expand "Project1", then "src" and select "tests".

    Selecting tests folder

  11. Click OK. You get an information dialog saying that exclusion filters have been added. Click OK.
  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 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

Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved.