Using Eclipse on CDF for HW3 Question 4

Here I will go step by step on how to get the starter code up and running on Eclipse in CDF. Using Eclipse to work on this problem can save you an enormous amount of time when compared to working directly with source files and java.exe.


Step 1: Make a folder called src on your Desktop

Make src folder


Step 2: Create a folder called csc263hw3starter in the src folder. You must get the spelling and case of this folder perfect.

It is not CSC263HW3STARTER, or CSC263hw3Starter, etc... It must be exactly:

csc263hw3starter

Make package folder


Step 3: Copy the source files and README.txt into the csc263hw3starter folder.

Copy starter code into package folder


Step 4: Launch Eclipse

Launch Eclipse


Step 5: If you haven't run Eclipse before, you may get this message. Just click OK.

Click Ok if you see this\


Step 6: Once Eclipse has launched (be sure to close any "Welcome to Eclipse" windows if you are presented with any), then select

File > New > Java Project

Make a new Java Project


Step 7: You should see a "New Java Project" dialog appear.

Here we setup our new project.

  1. Set the project name to HW3.
  2. In the Contents section, make sure the "Create project from existing source" radio button is checked
  3. Navigate to the src folder you created on the Desktop. Be sure to select the src folder, NOT the csc263hw3starter folder.
  4. Click the Finish at the bottom of the dialog

Setup your new project and import the starter code into it


Step 8: Now your project should be successfully setup :)

See step 9 for how to run your code.

Your project


Step 9: Running your code

To run your code, simply click the Run button as indicated below (it has a green "Play" symbol on it). It will automatically run the code in the main method of Experiment.java.  Good luck!

Run the project