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
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.
File | New | Java Project
Set project options
Enter project name, e.g., “Lab1”
Contents: default (“Create new project in workspace”)
JRE: default (“jre.1.6.0_02” or other 1.6 version)
Project layout: default (“Create separate folders for sources and class files”)
Select “Finish”
File | New | Class
Set class options
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>”.
Name: the name of your main class. For projects where the structure does not suggest otherwise, the project name is recommended, e.g., “Lab1”.
Which method stubs would you like to create?: Check the box for “main”.
Select “Finish”
If the new file (“Lab1.java”) does not appear, click the icon at right to “Go to the Workbench”
Within “main”, replace the TODO comment with an output statement such as
System.out.println("Hello, World!");
Run | Run or Ctrl+F11
Note the output in the Console tab in the bottom pane of the main window.