Step 2: How to create a new project

Launch Config Create Edit Run previous step next step

This step will show you how to create a Java application project in Eclipse.
  1. Choose File → New → Java Project from the Eclipse menu bar, as in the following example:
    New Project
  2. The following window will be displayed. Enter the Project name and make sure the "Use Project folder as root for sources and class files" option is selected in the "Project layout" section as shown in the image below:
    New Java Project

  3. If you click the "Configure default..." link in the "Project Layout" area, you can make these settings your default settings for new projects.  Select "Project" for the "Source and output folder" option and click "OK" button.  We recommend that students configure Eclipse in this way.
    Set the default config for build paths to be project folder
  4. After returning to the New Project Wizard dialog box, click Finish to actually create the project you just described. The following screen will be displayed, denoting a workspace with one project to choose from the Package Explorer:
    Workspace with HelloWorld project available for selecting

    Note: If you forgot to close the Welcome screen (shown in the prior step), then you will not see the above window. To close the Welcome screen, click the X on the tab labeled Welcome(towards the top left of the Eclipse window). Now you should see the workspace.

  5. Congratulations, you have created your first Java project! But, we're only part way there. Next comes putting some substance (code) into the project to make a working program!

    Leave this project window open, since you will be continuing with the tutorial at this time. In general, once you have created a project and are done working on it for the time being, you may exit Eclipse by clicking the  button in the upper right hand corner of the Eclipse title bar, or through the Eclipse menu File → Exit.

    Launch Config Create Edit Run previous step next step

    Original version created by Deb Deppeler and Sue Hazlett
    Updated for Eclipse by Martin Hock
    Updated for lab section use by Beck Hasti
    2008-2012 Updated by Jim Skrentny
    2014 Updated for v4.4 and added Editor Preferences by Deb Deppeler