Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Java Development User Guide
Previous Page Home Next Page

Detecting existing layout

Layout on file system

  • The source files for a product are laid out in one directory "src".
  • The class files are in another directory "bin".

    Layout on file system

Steps for defining a corresponding project

  1. Click Open Java perspective Window > Open Perspective > Other... > Java to change to the Java perspective.

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

  3. 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: .

    New Java Project wizard

  5. Click Next.

    Ensure that the source and output folders are detected.

    Java Project Source setup

    Warning: If the Scrub output folders when cleaning projects preference in the Output folder section of the Goto the building preference page Java > Compiler > Building preference page 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.

    Created Java project in Workspace

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 reference

New Java Project Wizard
Package Explorer View

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire