Detecting existing layout

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 "Product" in the Project name field.

  4. In Project layout group, change selection to Create separate source and output folders.

    In Contents group, change selection to Create project from existing source.

    Click Browse... and choose the Product directory on drive D:.

    Layout 2

  5. Click Next.

    Ensure that the source and output folders are detected.

    Layout 3

    Warning: If the preference Window > Preferences > Java > Compiler > Building > Output Folder > Scrub output folders when cleaning projects is checked, clicking Finish will scrub the "bin" directory in the file system before generating the class files.

  6. Click Finish.
  7. You now have a Java project with a "src" folder which contains the sources of the "Product" directory.

    Layout 4

Note: This solution creates a ".project" file and a ".classpath" file in the "Product" directory. If you do not wish to have these files in the "Product" directory, you should use linked folders as shown in the Sibling products in a common source tree section.

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