last updated Mar 30 2014
In CS 106A, we'll be using the popular Eclipse editor to build our programs. Stanford has built a customized version of Eclipse that includes special Stanford features to tailor it specifically for CS 106A. This document gives instructions on how to get started using Stanford Eclipse. Please follow these instructions exactly and do not skip steps! If you run into any trouble installing Eclipse, email our head TA, Vikas Yendluri (vikasuy).
Our version of Eclipse will run on Windows XP, Vista, 7, 8, and above. If you have an older version of Windows on your computer, you will need to do your class work in one of the public computer clusters. Before installing Eclipse, you will first need to have a copy of the latest version of the Java JRE (Java Runtime Environment) installed on your computer. Note that Java version 1.7 is the latest version of Java. If you don't know which version, if any, of the JRE you have, or want to upgrade to the latest version, just start at Step 1. We recommend most students at Step 1.
After clicking the above link, a prompt may appear to ask you whether you want to run or save the file. Click Run to begin the download and installation process. If a subsequent security warning dialog box appears, click Run (or Yes) to continue with the installation.
The Java JRE installation program should begin. Do a Typical installation, and follow the rest of the instructions given in order to complete your installation.
Save the file to somewhere on your hard drive. This may take a little while as the file being downloaded is rather large. Important note: make sure to get the current (most recent) version of Eclipse from CS 106A website. If you have a previous version of Eclipse installed on your machine, it will not function properly, and you should download the current version.
After completing these steps, your Eclipse should be installed. Now jump down to the Running Eclipse section of this page.
The version of Eclipse that you download for the Mac depends on which version of Mac OS X you have. If you don't know which version of Mac OS X you have, you can check by clicking the Apple menu in the upper left-hand corner of the screen and selecting About This Mac. Stanford Eclipse will only work on Mac OS X version 10.6 ("Snow Leopard") or higher. If you don't have that version of the operating system, you'll need to either upgrade or do your class work in a public cluster.
Save the file to somewhere on your hard drive (or it may automatically get saved to your Downloads folder).
After completing these steps, your Eclipse should be installed. Now jump down to the Running Eclipse section of this page.
At this point you should have Eclipse installed and working on your computer. When you run eclipse for the first time, you may get a screen that looks like this:
A workspace is just a directory in which Eclipse will place your projects. In 106A you won't have to make any new projects from scratch. We will always give you skeleton projects for your assignments, so you don't need to worry about where the workspace is, so the suggested location is fine. Check the "Use his as the default and do not ask again" checkbox, and then click OK. Once you do, Eclipse will start running and then bring up a screen that looks like this (it may look slightly different on the Mac):
The layout of the screen, which the Eclipse designers decided to call a perspective, corresponds to the Stanford Editor perspective, which is where you will want to start editing your programs. Because Eclipse is a professional tool, it contains many advanced features that can be confusing to new programmers in an introductory course. The purpose of the Stanford Editor perspective is to hide many of these features that you don't need. If you ever find yourself in a perspective that seems confusing, click on Stanford Menu in the menu bar and then select Editor. You can also click on the Editor button from the main toolbar, which looks like this:
Once you have Eclipse loaded, your next step will usually be to create a new project in your workspace by importing a skeletal framework that we provide called a starter project. Using starter projects makes your life much easier by allowing you to ignore the many details involved in creating a project from scratch. Every assignment will include a starter project for each problem, and your first task will be to download the starter project from the class website and then importing it into your workspace. The details for doing so are described in the handout "Using Karel with Eclipse".
If you run Linux or have been instructed to do so by a section leader, here is a direct link to downloading the Stanford Eclipse plugin. We do not recommend installing in this way unless you have been explicitly told to do so.