Using Eclipse in the Lab

  1. Log in to a computer in the lab under linux using your cs12x username, which should have been given to you on the first day of class. These instructions will not work on Windows. If you are logged into Windows, restart your machine and select "CentOS" from the boot menu.

    If you do not know your login, it can be found with the ACS account lookup tool. Your password is the same as your personal ACS account password.

    If you do not login with your cs12x account, your assignments will not be collected. DO NOT USE YOUR OCE ACCOUNT.

    Open a new terminal by going to Applications -> System Tools -> Terminal

    Tip: You can also open a terminal by right-clicking on the desktop and clicking "Open Terminal"

  2. Type the following at the prompt:
    eclipse &

    The last command will launch Eclipse in the background, which will free up the terminal for use while Eclipse is running. In general, following a unix command with an ampersand (&) will start it in the background. We want to do this for GUI applications like eclipse and gvim, but not for in-terminal programs like vim.

  3. Eclipse will prompt you for a workspace. Accept the default location and check Use this as the default and do not ask again and click Ok.
  4. Go to File -> Import.
  5. Expand General and select Existing Projects into Workspace and click Next.
  6. Click Browse.
  7. Select the folder of the homework assignment you wish to open. Click Ok.
  8. The name of the project should appear with a checkmark beside it. Click Finish.
  9. Your project will show up in the Project Explorer (left). Double-clicking on a file in the project explorer will open it in the text editor. There are several ways to build your project:
  10. To run an application, press Ctrl + F11 or click the Run icon (white arrow in green circle).
    You will be confronted with the 'Run' dialog. Double-click C/C++ Local Application to create a new run/debug configuration.
    Select your new configuration and click Search Project.
  11. Select the binary you wish to run (there aren't many choices) and click Ok. The program will execute.
  12. When you're done writing your program turn in your program by following The Turnin Procedure.