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

Organizing sources

Layout on file system

  • In this section, you will create a new Java project and organize your sources in separate folders. This will prepare you for handling more complex layouts.
  • Let's assume you want to put your sources in one folder and your tests in another folder:

    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 Opens the New Java Project wizard File > New > Other... > Java Project to open the New Java Project wizard.

  3. Type "MyProject" in the Project name field.

  4. In Project layout group, change selection to Create separate source and output folders and edit Configure default... to modify Source folder name from "src" to "sources".

    Build Path Preferences page

  5. Click OK to return on New Java Project wizard and then click Next.

    Java Project Source setup

  6. To add another source folder to your project, click Create new source folder link in Details pane or button Create a new Source Folder for the Project in view bar.

  7. In New Source Folder dialog, type "tests" in the Folder name field.

    New Source Folder dialog

  8. Click Finish to validate and close the dialog.
  9. Your project setup now looks as follows:

    Java Project Sources final setup

  10. Click Finish
  11. You now have a Java project with two source folders: sources and tests . You can start adding classes to these folders or you can copy them using drag and drop.

    Created Java project in Workspace

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