CS 201 - Installing Java and Eclipse
If you want to run Java and Eclipse on your own computer, here's what to do:
- Install the Java JDK (Java Development Kit), version 1.8 ("Java
8"). Do not install version 1.9 ("Java 9") - it is currently
not compatible with the latest version of Eclipse. Download
JDK 1.8 here. (If that link doesn't work, download the JDK 1.8
from the Java
SE Downloads page). Click the download button for "JDK". Follow
the instructions there and all should be well. Remember whether you
installed the 32-bit or the 64-bit version (either will work, when in
doubt use the 64-bit version).
- Download and install Eclipse from
http://www.eclipse.org/downloads/. Download the Eclipse Installer
and select 32 bit / 64 bit to match your version of Java. Once you
run the installer, select "Eclipse IDE for Java Developers".
- Start Eclipse by double-clicking on it. On a Mac you might need
to hold down the control key while clicking Eclipse in order to get it
to run the first time.
If you want to use Bailey's structure or structure5 package,
download bailey.jar from
and save it somewhere on your computer.
If you have a Mac, the simplest option is to store the file where
the java compiler will find it. Follow these instructions:
To use Bailey's structure package on your own Mac, open the
Finder, select "Computer" from the "Go" menu, and put the file into
The other option (for any computer) is to store bailey.jar
in a permanent location, e.g., your cs201 folder or within
the Eclipse installation folder, then tell Eclipse where to find this file:
Computer / Macintosh HD / Library / Java / Extensions
- Start Eclipse.
- Open the Window menu and select Preferences. (On Macs, Preferences is
found in the main Eclipse menu.)
- Click on the icon to the left of Java to expand the Java choices.
- Expand Build Path and then select Classpath Variables.
- Click the New button.
- For the name, enter BAILEY. Be sure to spell it exactly
like this and in all capitals.
- For the Path, click the File button and find the
bailey.jar file you just downloaded.
- Click OK and OK again.
Now, if you want to use Bailey's structure package in a project:
- Open the project and select "Project Properties"
- Select "Java Build Path",
- Select the "Libraries" tab
- Click on "add variable" and select BAILEY.
Creating new projects
For most of the assignments, we will provide zip files that already contain
Eclipse projects, which you then "import" into Eclipse as in HW 4. However,
if you ever want to create a new project from scratch, here's how:
- Open the "File" Menu. Select "New" and then "Project" from the submenu.
- Select "Java Project", which may be showing at the top level or
you may have to open the Folder labeled "Java" to find it, and then click "Next".
- Enter the Project name.
- If you are not planning to use Bailey's structure or structure5
package, or if you have saved it in the Extensions folder as described above,
you are all done. Click Finish and skip the rest of the steps.
Otherwise, if you've defined the BAILEY variable as described above, click Next.
- Select the "Libraries" tab.
- Click "Add variable".
- Select BAILEY from the list and click "OK".
- Click "Finish".
Credits: Part of these instructions were derived from a handout