CSCI 136 - Fall 2019

Data Structures & Advanced Programming

Home | Bill's Lectures | Sam's Lectures | Labs | Handouts & Problem Sets | Links | CS@Williams

This page includes instructions for setting up Windows and Mac laptops for use on labs. If you find that these instructions are not accurate, please let your instructor know! I keep this page as up to date as possible, but feedback is always welcome!

Windows

I do not have a Windows laptop, but these instructions have worked in the past. If you have problems with any of these steps, please let me know.

You basically need five "programs" in order to work on labs on your laptop: java, atom, git, bailey.jar, and an SSH program.

JAVA: First, you need to install java, which you can download from here. Follow the installation instructions for java that come with the download. We use version 1.8 in the lab, although newer versions should be ok too.

ATOM: Second, you need to install atom, from atom.io.

GIT: Third, you must install git from here. After git is installed, unix git commands (git clone for example) should work as-is from the command prompt (both Windows Powershell and CMD).

bailey.jar: Finally, you need bailey.jar. You can find it here. You will need to add it to your CLASSPATH environment variable. Google for "set CLASSPATH Windows" and you should be able to find your solution for whatever version of Windows you are using. Let me know if you need help with this.

SSH: An SSH client is useful because it allows you to connect to lab computers remotely. Download and install PuTTY from here. You should use gala.cs.williams.edu as your server, and use your user id and password from the Mac lab.

SCP: If you want to copy files back and forth between the lab machines and your computer, you will need an SCP client. WinSCP is one option. You should use gala.cs.williams.edu as your server (host) name, and use your user id and password from the Mac lab.

Mac OS

If you have a Mac, you probably already have java. Open a terminal and type "java -version" to make sure. You also might have emacs. You can test this by opening a terminal and typing "emacs". If nothing opens, you probably need to install it.

ATOM: Second, you need to install atom, from atom.io.

GIT: Third, make sure you have git. Instructions for checking if it is already present, and installing it on your computer if not, can be found here.

bailey.jar: You also need bailey.jar. You can find it here. You will need to add it to your CLASSPATH environment variable. This can usually be accomplished by adding the following line to your ".bashrc" file in your home directory (make sure you substitute the full path to bailey.jar where "/path/to/jarfile/" appears:

           export CLASSPATH=/path/to/jarfile/bailey.jar:.

You should also add this line to a file called ".bash_profile" in your home directory.

SSH: You will use SSH (usually installed by default) to connect to our server and copy files back and forth. You should use gala.cs.williams.edu as your server, and use your user id and password from the Mac lab. This will allow you to connect to our lab machines remotely.

Copying files

To copy files back to your Mac account, you will use the secure copy utility (scp) from either PuTTY, WinSCP, or your Mac terminal. The syntax is important, so please think before you type. In this example, we will copy file.java from our laptop back to the CS Macs. Note that if there is another file called "file.java" on the Macs, this will override it! Be careful. In this example, abc1 is your CS unix id.

scp file.java abc1@gala.cs.williams.edu:file.java

To copy a file from gala over to your laptop, you can use:

scp abc1@gala.cs.williams.edu:file.java file.java

In general, the first argument is the source, and the second argument is the destination. Whenever you want to specify a remote machine, you must specify your username, hostname, and file name in the format shown. You can close the connection to gala by typing "exit".