CS 201 - Installing Java and Eclipse
If you want to run Java and Eclipse on your own computer:
- Install the Java JDK (Java Development Kit), version 1.7 ("Java 7")
- Windows and Linux users: Instructions can be found at
http://www.java.com/en/download/help/download_options.xml. The actual
files can be found at: http://java.com/en/download/index.jsp.
Remember whether you installed the 32-bit or 64-bit version.
- Mac users: If you've been running software update regularly
(under the Apple menu), you probably have the latest version. To check,
open terminal and type "java -version". The version number should start
with 1.7. If it doesn't, go to the links above and download the latest
version. This command will also indicate whether your version is 32-bit
- Download and install Eclipse from
http://www.eclipse.org/downloads/. Download "Eclipse IDE for Java
Developers", and select 32-bit or 64-bit to match your version of Java.
- For a few of the assignments, we'll be using some of the code from the Bailey book.
Download bailey.jar from
and save it in a permanent location, e.g., your cs201 folder or within
the Eclipse installation folder (for Windows, this might be C:\eclipse).
Next, tell Eclipse where to find this file:
- 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 some of the assignments you will need to create a new Eclipse project.
To create a new project from scratch:
- Open the "File" Menu. Select "New" and then "Project" from the
- 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
- Enter the Project name.
- Make sure the "Create separate folders for sources and class files" is selected.
- If you are not planning to use Bailey's library, click Finish and skip
the rest of the steps. If you are planning to use Bailey's code, 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