We want you to work on your projects in Eclipse, a powerful environment for Java and a number of other languages. Eclipse may seem like overkill for CSE332 - probably because it is. But as projects get larger, having an integrated development environment with lots of features will come in handy, and learning new tools is always helpful.
You can use Eclipse in the lab, or download it to your personal machine. The download site offers a number of different versions; you'll want 'Eclipse IDE for Java Developers.' (We do not recommend trying to run Eclipse remotely, for example over an X connection, because it would react too slowly.)
eclipse &
Upon running Eclipse you should see a pane labeled 'Package Explorer', probably on the left. If you do not see one, you can open it up by going to the Window menu, selecting Show View and Package Explorer. If it doesn't show up under Show View, select Other, then 'Java', then 'Package Explorer'.
The Package Explorer lists each project in the current workspace. To create a new project, right click in the package explorer pane and select New, then Java Project; you'll be asked to provide a name for your project (something like project1 for the first course programming assignment is reasonable), then click Finish and your project will appear in the package explorer.
If an icon in the package explorer looks like a blue folder, the project is closed and can be opened by double clicking on it. To close a project (say, to save memory if you have numerous projects available), click right on it and select Close Project. You can traverse the tree of an open project to view the packages and Java files it contains, and you can double click a file to open it up. Eclipse projects can get pretty big, with multiple packages and large numbers of classes, so the organization provided here can be quite helpful.
To compile, go to the Project menu and select Build All (the hot-key for which is Ctrl-b). Your project may be set to 'Build Automatically' (in the Project menu) - if so, Build All is disabled, as it happens, well, automatically. If there are errors in your code, the files will be marked in the package explorer with a red icon. When you are viewing a file, lines with errors are marked (to the left) with a red icon; hover the mouse cursor over the icon to see the error.
Also, Eclipse checks your program as you type, marking errors and warnings, so you may see errors appear before you even 'build'. This helps you debug as you go, instead of all at once when you compile.
Once you've got your program compiled, you need to create a 'Run Configuration' to run it. A Run Configuration specifies which class's main() method to run, and what arguments to pass in.
Open the Run menu and select Run Configurations. Double click on 'Java Application' in the list; this creates the configuration and from there you can give your run configuration a particular name and select the 'Main class' to run from. Select the 'Arguments' tab if you want to fill in arguments to be passed to your program as it runs, and enter them in the 'Program arguments' box.
Once you are done creating your run configuration, you can run it by selecting Run from the Run menu, or hitting Ctrl-f11. To terminate a running program, go to the Run menu and select Terminate.
Note: If your program executes without outputting to the console, creating a window or the like, you may not get any indication that it's running.
For the projects in this course, you'll need Java 1.7 (technically, 1.6 will work, but will be more of a hassle to use for project 3). To check the version of Java being used by a project in Eclipse, explore its tree in the package explorer until you see something like 'JRE System Library'. It should list '1.7'. If it lists an earlier version of Java, right click and select Properties (of 'Configuration' in some versions), and set the 'Execution Environment' to JavaSE-1.6.
It's possible that Java 1.7 simply isn't installed on the machine; to install it, go to sun's homepage and download and install the JDK7. You may still need to change the version of Java used in your project as described above. Finally, you may need to change the compiler settings to use Java 1.7 settings; to do this, right click the project name, select Properties, go to 'Java Compiler' and make sure things are set to 1.7.