Testing Code On Leland Machines using Eclipse

<< Back to JavaTools

NOTE: This document is meant to be a quick and dirty guide to get your code compiling and executing on the Unix machine using Eclipses. If these instructions do not work, please email cs108staff@gmail.com with your problem, and then refer to the More Detailed Unix Guide to try and solve your problem.

Machines That Work

You will only be able to compile and execute code on the following machines: IMPORTANT: Please only use Java 5 features. To ensure this, only use methods listed on the javadoc pages listed by the CS108 website.

1. Upload your code to a leland machine

Download an SFTP client from http://ess.stanford.edu

Use your SFTP application to log in to a leland machine and upload your code directory so that you can open it up on that machine.

2. Running Eclipse

Make sure you are running on a pod or a myth machine!!!

You also need to know how turn on X-forwarding on ssh (ie use vnc to login). If you don't know what that is, then look here.

Execute the following if on pod (32 bit):

/usr/class/cs108/bin/runeclipse32

Execute the following if on myth (64 bit):

/usr/class/cs108/bin/runeclipse64

3. Running Your Code

In Eclipse, to import your code:

  1. File -- New.. -- Java Project
  2. Give your project a project name (same as on your local machine)
  3. Check "Create Project from Existing Source"
  4. Choose the directory of your project as the source directory using the "Browse..." button.
  5. Click "Finish"

In an ideal world, your project will load into Eclipse without error, and you can compile/run it immediately.

Email problems with these instructions to cs108staff@gmail.com