Using Eclipse at Home

  1. You will need an SSH and SFTP client to perform the following steps. Two popular options are:
  2. First you need to acquire the assignment from the public area and copy it to your home directory. Launch SSH. Press any button to continue, then type in ieng6.ucsd.edu in the Host Name and type your CSE 12 username into the User Name textfield and click Connect. If you don't know your cs12x login, it can also be found by using the ACS account lookup tool.

    If this is your first time logging in to ieng6, you will be prompted about host identification. Click Yes.

  3. Type in your password at the next screen. It is the same as your personal ACS account password.
  4. You should see a lengthy welcome message (press 'q' to skip). At the prompt, type the following (without the dollar signs):
    $ cd ~/../public/hw0
    $ make directories
    $ make install
    $ cd ~/hw0/c
    $ mv hw0.c.empty hw0.c
    $ cd ../cpp
    $ mv hw0.cpp.empty hw0.cpp
    $ cd ../java
    $ mv hw0.java.empty hw0.java
    $ cd ..
    $ make

    You have now acquired the assignment from the public area, copied it to your home directory, and compiled it.

  5. Before you can work on your assignment in Eclipse, you have to copy it to your computer. Launch Secure File Transfer Client (included with SSH install). The same login dialogs appear as when you logged into SSH Client in steps 2 and 3. Follow the same login procedure as above.
  6. You should see a folder named hw0 on the right. On the left, navigate to the folder where you want to store your homework assignments. Drag the hw0 folder from the right pane to the left pane.

    Tip: The File Transfer Client also lets you drag directly to and from Explorer windows.

  7. Open Eclipse and go to File -> Import.
  8. Expand General and select Existing Projects into Workspace and click Next.
  9. Click Browse.
  10. Select the folder that you just transferred to your computer and click Ok.
  11. Make sure the project name is checked and click Finish.
  12. The project will now appear in your workspace. Double-click on a file in the Project Explorer to open it in the editor.

    If Build automatically is selected from the Build menu, the project will be built whenever you save a file. If not, you can build the project by pressing Ctrl + b.

    The project can be run by pressing Ctrl + F11.

  13. To pass command line arguments to your program, go to Run -> Open Run Dialog...
  14. Click the Arguments tab and type your arguments in the Program arguments textbox. Click Ok when you're done.
  15. When you're done editing your files, upload them back to ieng6. Only upload the .c .h and .java files you modified.