Faculty of Engineering

SEG 2105 Lab 2 / Assignment 3: Getting Started

Creating the proper environment &
Loading the proper environment into Eclipse Integrated Development Environment

Note: the following images come from Eclipse 3.2, but it the lab has been tested in versions of Eclipse up to 4.2 (Juno).





Please mimic the above on your H: drive by

  1. Downloading the following zip file containing the code for OCSF and Simple Chat Phase 1.
  2. Creating a directory called "lab2".
  3. Extracting the ocsf and simplechat1 directories from the zip file into the lab2 directory, exactly as above.



  4. To Load the proper environment into Eclipse, follow these steps

    1. Start up Eclipse using the windows start button. Find the Eclipse application in the list of programs.
    2. Go to File, New -> Project.

    3. Select Java Project and click Next.

    4. Call your project 'lab2' and 'Create project from existing' lab2 directory. Click next.

    5. In the next window, you are able to modify the output folder as shown below and click Finish.
      (You don't have to, but I like to separate source and compiled code, so I set the output folder to be 'lab2\bin')

    6. You should now be in your editing environment. If you expand the folders shown bellow within the 'Package Explorer' window, you should see your respective java files.

    7. Create two run configurations (introduced in lab1): One for ClientConsole and a second for EchoServer. (Click 'close' not 'run' when prompted)

    8. In order to run the chat application, you must start the server first: RUN the EchoServer configuration.
    9. A window pane will appear showing the message “Server listening for connections on port 5555”.
    10. Now, RUN the ClientConsole configuration.
    11. Type something in the window and you will see it echo back.
    12. Try running the server and client on seperate machines. (HINT: You will need to pass the IP address of the server as an argument when running ClientConsole)
    13. Proceed to the lab 2 instructions