Contents:

The Trade-Offs

Many students find it more convenient to use their own computers rather than the machines in the UW CSE instructional labs in the basement of the Allen Center. But the labs already have all the necessary software for CSE 331 installed and configured correctly. While you are welcome to use your own machines and the staff will help to an extent that is feasible for us, it can be difficult to predict and debug every installation/configuration problem.

In the end, the staff, given our limited time, may have to advise you to use the department resources if you are having too much trouble installing your own software. Helping with configuration on your own machine is lower priority than helping students with homework questions, getting grading done, etc. We probably cannot help with software other than Eclipse and the other tools used in the course.

Note that no matter where you work, you will need to remotely log in to the department machine attu to validate your homework submissions in order to make sure you turn in the correct files and your programs compile and run the tests using the compiler and tools the staff will use for grading. Be sure to do this enough in advance of deadlines to avoid issues.

The Four Main Options

  1. You can do your work in the Allen Center labs. With this option, there is no software to install and you can proceed directly to learning how to use version control, Eclipse, etc. The only part of the instructions below you need is about logging into attu.
  2. You can install the department's home virtual machine on your own computer following the department's instructions. This essentially puts a copy of the lab's Linux installation on your own computer, even if your computer does not otherwise have Linux, combining the convenience of your own computer with the department-installation of the labs. As with working in the labs, all that remains is logging into attu as needed.
  3. You can do all your work by logging into attu and using it remotely. This should work, but attu is a shared and remote machine, so you may find large programs like Eclipse run slowly.
  4. You can install Java, Eclipse, Subversion, and other necessary tools on your own computer. Most of the instructions below are for this option.
To be clear, you can skip Steps 1, 2, and 3 below unless you are taking the last option.

Step 1: Get Oracle's Java Development Kit (JDK)

You want to download Oracle's J2SE v7.0 JDK from their web site. This is somewhat tricky because there are a lot of things on the download page with nearly the same name. For example, the JRE is the Java Runtime Environment which lets you run Java programs, but does not provide the tools for Java development.

Thus, go to http://www.oracle.com/technetwork/java/javase/downloads/ and make sure that you follow the link labeled Download JDK. Be sure to get the latest version of Java 7, not Java 8, for 15sp quarter.

Step 2: Get Eclipse

You can download a copy of Eclipse 4.4.1 for your machine at http://download.eclipse.org/eclipse/downloads/ if you want the basic installation or https://www.eclipse.org/downloads/ for the “Java Developer” version that has some additional tools (none of which we will depend on in CSE 331). You are also welcome to use the lab machines which also have Eclipse installed.

Where to Put Eclipse on Your Machine

Eclipse does not come with an installer, so this confuses many people. Basically, you download it, unzip it into a directory, and then run the executable in that directory to start Eclipse. There are some small bugs in Ant within Eclipse that manifest themselves if it is installed in a directory with spaces in its name, so instead of installing it into a directory such as:

C:\Documents and Settings\Joe User\Desktop\eclipse

or

C:\Program Files\eclipse

use:

C:\eclipse

Setting the JDK in Eclipse on Windows

If you are using Windows, setup your Eclipse workspace to use the JDK as described in the Tools: Editing, Compiling, Running, and Testing Java Programs handout.

Step 3: Use SVN

Eclipse

We recommend the Subclipse SVN Plugin for Eclipse to manage the assignments. Please follow the instructions mentioned below. But if you get stuck, please refer to the official installation instructions

Installing Subclipse

Windows users will need to download SSH clients (if they haven't already) before the Subclipse Plugin. SSH clients include TortoiseSVN and PuTTY. After you install these, install Subclipse as described below and continue the rest of the set up process. This is done to prevent a common Subclipse error: "SVN Cannot Create Tunnel." For additional information refer to this blog post.

To install Subclipse:

  1. Open Eclipse (As mentioned in the Eclipse section above, please use Eclipse 4.4.1)
  2. Go to Help->Install New Software
  3. Click Add in the window that opens up
  4. For the Name field: put "Subclipse"
  5. For the Location field: put "http://subclipse.tigris.org/update_1.10.x"
  6. Hit ok
  7. Two checkboxes will appear for Subclipse and SVNKit. Check them both
  8. Hit Next and Agree and Finish the installation
  9. Restart Eclipse once that is done

Subclipse is a handy tool: it has nice features and is integrated into your development environment. However, it is also buggy. If you have trouble with it, don't get frustrated or stuck. The command-line tool svn tends to be more reliable, and you should feel comfortable using it as well. It works on all operating systems. Another option, which is also more reliable than Subclipse, is TortoiseSVN, which works only on Windows computers.

After installing Subclipse, you should be able to access your SVN repository.

Command Line

The command line should function the same as in the Allen Center software labs, with the exception that when you checkout, you must specify the repository URL as svn+ssh://YourCSENetID@attu.cs.washington.edu/projects/instr/15sp/cse331/YourCSENetID/REPOS. For example, to checkout the cse331 directory you should run:

svn checkout svn+ssh://YourCSENetID@attu.cs.washington.edu/projects/instr/15sp/cse331/YourCSENetID/REPOS/cse331 cse331

Logging in to attu with SSH

attu is the name of an Instructional Workstation (IWS) Linux machine. You will occasionally need to log into this machine. How you log into attu depends on whether you are starting from a Linux machine or a Windows machine.

SSH on Linux

  1. Obtain a command prompt (a.k.a. a terminal or console). You can do so by clicking on Applications -> System Tools -> Terminal.
  2. At the command prompt, run the following command:
      ssh YourCSENetID@attu.cs.washington.edu
    

    Use the same password you use to login to the Linux machines in the Allen Center software labs.

    Note for those who are new to the command line): When you try to type passwords in the command line, you may be alarmed that you can't see any text entered. To protect your password your typing simply isn't being shown. Just type your password as normal and press enter.

If you are using the Linux machines in an Allen Center software lab, you can alternatively use a shorter version of the command:

  ssh attu

This works because the username defaults to the username you are currently logged in with and the target domain defaults to the domain of the machine you are connecting from.

SSH on Windows

In either case, your username is your CSENetID, and your password is the same one you use to login to the Linux machines in the Allen Center software labs.

Server Authentication Warning

The first time you connecting to attu from a given machine, you will receive a server authenticity warning like this:

  The authenticity of host 'attu.cs.washington.edu (128.208.1.139)' can't be established.

Along with the warning, the SSH client will display the RSA key fingerprint of the remote host so that you can verify the host's identity. It is safe to say "yes" to continue connecting. When you connect, SSH will cache the host key in order to automatically verify the remote host's identity in the future.

File Transfer: SCP

If you only want to transfer files between your CSE account and your home machine, you can use scp ("secure copy"). For CSE 331, you should rarely, if ever, need to manually transfer files. All your code and other homework materials will be in a Subversion repository, allowing you to automatically and safely synchronize your work across machines. We provide information about scp as a reference for your general knowledge.

On a Mac or Linux machine, you can run scp at the command line. Run man scp for documentation on this command. If you prefer a graphical interface or if you are using Windows, you can install a file transfer program such as WinSCP. Most of the directions above for establishing a remote connection via ssh also apply to scp.