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

You want to download Oracle's Java SE 8 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, you should not download the JRE (the Java Runtime Environment), which lets you run Java programs, but does not provide the tools for Java development.

Thus, go to and make sure that you follow the link labeled Download JDK. Be sure to get Java 8 for the Winter 2016 quarter.

Step 2: Get Eclipse

The Eclipse project produces several different versions of the environment. The one you should get for CSE331 is the Eclipse IDE for Java Developers version available at This version includes the egit plugin that we will use to access git repositories for CSE331. You are also welcome to use the lab machines which also have Eclipse installed.

Where to Put Eclipse on Your Machine

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 do not install it into a directory such as:

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


C:\Program Files\eclipse

But instead use a directory like:


The current version of Eclipse does have a proper installer. We suggest you download that if you are on a Windows machine, run it, and select Eclipse for Java Developers from the available options. It will put Eclipse in an appropriate directory and add Eclipse to the start menu. If you are using a Mac, you can either download the installer and run it, or download Eclipse for Java Developers, which will give you a regular Mac application that you can put in the top-level Applications folder.

Setting the JDK in Eclipse

To use the Ant buildfile, you may need to tell Eclipse to use the Java JDK (development kit) instead of the JRE (runtime environment).

  1. Different menu depending on operating system:
    1. Windows: In Eclipse, go to Window » Preferences to open the Preferences dialog.
    2. Mac: In Eclipse, go to Eclipse » Preferences to open the Preferences dialog.
  2. In the left pane of Preference dialog, select Java » Installed JREs
  3. Click the Search... button in the Installed JREs pane
  4. In the directory selection window that appears, select C:\ » Program Files » Java as shown in the screenshot below.

    Screenshot: Searching for JREs

  5. Click OK
  6. In the Installed JREs list, check the box next to jdk1.8.0_60 (or any version that starts with jdk1.8) and click OK

    Screenshot: Selecting jdk1.8

  7. If Eclipse shows the welcome screen, containing only the text "Welcome to the Eclipse IDE for Java Developers" on a pretty background, switch to the code editor by going to Window > Open Perspective > Other... and selecting Java (default).

Step 3: Clone Git Repository in Eclipse


The following instructions will show you how to use Eclipse to check out git projects. We will assume that you will check out a project called cse331-16wi-YourCSENetID. When you check out cse331-16wi-YourCSENetID, Eclipse will automatically set up an Eclipse project named cse331-16wi-YourCSENetID for you.

  1. Open Eclipse in any workspace
  2. First you need to set the preferences in git
    1. Go to Eclipse » Preferences » Team » Git » Configuration
    2. Make sure the email is your cse email address (or UW email if premajor) and name is your full name. If this is not the case, add two new entries: one with key "" and value your name, and another with key "" and value
    3. Apply any changes you made and hit “OK“
    4. Eclipse: Setting up Git Config

  3. Add an SSH key for the computer you are running Eclipse on, if there is not one already
    1. Navigate to Eclipse » Preferences » General » Network Connections » SSH2
    2. Hit the “Key Management“ tab
    3. Hit “Generate RSA“ key
    4. Enter in your UWNetID into the “Comment“ box
    5. Then, click “Save Private Key“ and choose somewhere safe
    6. Copy the text starting with ssh-rsa and paste this key to your Gitlab SSH Keys
    7. Eclipse: Setting up SSH Keys

  4. Go to File » Import » Git » Projects from Git
  5. Hit “Next“
  6. Select “Clone URI“

    The next dialog will ask you to enter the source of your git Repository. Ignore the URI field, and fill in the following fields:

    Do not forget the .git at the end!

  7. Finish out the wizard, and you should have a new project in Eclipse! (Note: you may see a black star next to the new files in your newly checked out project, these should go away after your first commit)
  8. Eclipse: Adding the repository URI