Creating a new Java project in "Eclipse IDE for Java Developers"

These instructions were written for Eclipse IDE for Java Developers 3.3/Europa - the specific version of Eclipse we'll be using in SE1010. The steps may vary somewhat for other versions. To ensure you have the correct development tools installed, see jdkEclipseSetup.

- Start Eclipse for Java Developers

  1. Select the workspace that will be used for all your projects. For example, “se1010” in “My Documents”. If this folder doesn't exist, it will be created.
  2. File | New | Java Project
  3. Set project options
    1. Enter project name, e.g., “Lab1”
    2. Contents: default (“Create new project in workspace”)
    3. JRE: default (“jre.1.6.0_02” or other 1.6 version)
    4. Project layout: default (“Create separate folders for sources and class files”)
  4. Select “Finish”
  5. File | New | Class
  6. Set class options
    1. Package: something that uniquely identifies the scope of your work. A common standard is to use ”<yourusername>”. Some instructors may prefer “edu.msoe.se1010.<yourusername>”.
    2. Name: the name of your main class. For projects where the structure does not suggest otherwise, the project name is recommended, e.g., “Lab1”.
    3. Which method stubs would you like to create?: Check the box for “main”.
    4. Select “Finish”
  7. If the new file (“Lab1.java”) does not appear, click the icon at right to “Go to the Workbench”
  8. Within “main”, replace the TODO comment with an output statement such as
    System.out.println("Hello, World!");
  9. Run | Run or Ctrl+F11
    • If prompted, select “OK” to save your changes
  10. Note the output in the Console tab in the bottom pane of the main window.
    • If there were Problems, you can see a list in the “Problems” tab. Ctrl+, and Ctrl+. can be used for quickly navigating among problems in a file.
se1010labs/creatingaproject.txt · Last modified: 2010/03/09 20:55 (external edit)
 

This website is not owned or managed by the Milwaukee School of Engineering.

© 2003-2010 Dr. Christopher C. Taylor, et. al. • Office: L-343 • Phone: 277-7339 • npǝ˙ǝosɯ@ɹolʎɐʇ • -> RSS <-