CS 201 - Installing Java and Eclipse

If you want to run Java and Eclipse on your own computer, here's what to do:
  1. 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).

  2. 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".

  3. 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.

  4. If you want to use Bailey's structure or structure5 package, download bailey.jar from here, 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

    Computer / Macintosh HD / Library / Java / Extensions
    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:

    Now, if you want to use Bailey's structure package in a project:

That's it!

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:
  1. Open the "File" Menu. Select "New" and then "Project" from the submenu.
  2. 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".
  3. Enter the Project name.
  4. 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.
  5. Select the "Libraries" tab.
  6. Click "Add variable".
  7. Select BAILEY from the list and click "OK".
  8. Click "Finish".

Credits: Part of these instructions were derived from a handout at Pomona