Installing the Eclipse IDE at Home

Last updated: December 19, 2008


Tool Recommended Version for CSE 421
Java J2SE JDK 1.6 (aka 6.0), current patch is 7
Eclipse IDE 3.4 (aka Ganymede)
JUnit 4.3.1 (included with Eclipse)
FindBugs 1.3.4
Checkstyle 4.4.2

Installing Eclipse at home is fairly easy, despite the paucity of installation instructions easily available from the Eclipse web site. Installation requires four steps:

  1. Downloading a JDK
  2. Downloading Eclipse
  3. Launching Eclipse
  4. Installing plugins

Each of these steps is described below. Please read through these directions completely before beginning the installation.

Step 1: Downloading Java Development Kit (aka J2SE JDK)

  1. Go to http://java.sun.com/products/archive. For consistency with the stdlogin environment in which the TA will grade your labs, we suggest using the recommented release listed above instead of the latest JDK release available from Sun.
  2. Choose Java 2 Platform Standard Edition (J2SE), JDK/JRE - 6, "6 Update 7", and click "Go".
  3. Click on "Download JDK", select your platform, accept the licence argreement, and then click on the files names to download with your browser.
  4. Shortcut: If you happen to be running Windows, you can skip the above steps by directly downloading this file: jdk-6u7-windows-i586-p.exe.
  5. Run the installer, accepting all the defaults including the installation locations.

On a Windows machine, following these steps will create a subdirectory of C:\Program Files\Java which contains the JDK installation (eg C:\Program Files\Java\jdk1.6.0_7). You may have other subdirectories of C:\Program Files\Java corresding to other JDKs or JREs that were previously installed. Do not remove these other Java installations if they exist.

Step 2: Downloading Eclipse

  1. Go to http://www.eclipse.org/downloads/packages/release/ganymede/r and click on the link corresponding to your OS next to "Eclipse IDE for Java Developers".
  2. Pick a mirror site, and the download of a zip file begins.
  3. Shortcut: If you happen to be running Windows, you can skip the above steps by directly downloading this file: eclipse-java-ganymede-win32.zip.
  4. Extract the zip file. On Windows, you can right-click and "Extract All...". On Linux, you will gunzip and tar -xf the downloaded file. The extraction results in a directory containing a single subdirectory called "eclipse".
  5. Move and rename this eclipse subdirectory to an appropriate location on your hard disk. For Windows, I suggest renaming this eclipse subdirectory to C:\Eclipse\v3.4-Ganymede
  6. You might find it useful to create a shortcut to C:\Eclipse\v3.4-Ganymede\eclipse.exe and then put this shortcut on your desktop.

Step 3: Launching Eclipse for the First Time

  1. Run the Eclipse executable and choose a directory when prompted for a workspace. (Accepting the default is fine.)
  2. Go to workbench by selecting the appropriate large icon. (You can always get back to this welcome screen later, with Help > Welcome, and take a look at the tutorials and samples available through the other icons.)
  3. Check that the following configurations are properly set. These settings are all available under Window > Preferences
    • Java > Installed JREs, ensure that the recommended JRE version (ie jre1.6.0_7) is listed and selected. If it is not (eg Eclipse chooses the most recent JRE it finds installed on your machine, which may be a more recent JRE version than the recommended one), click "Add" and browse to your JRE directory (under JDK installation directory in step 1 above) and click OK.
    • Java > Installed JREs > Edit > Default VM Arguments, add -enableassertions (or -ea for short).
    • Java > Compiler, the "Compiler Compliance Level" should be set to the same version as the recommended JRE (ie 1.6).
    • General > Workspace > New text file line delimeter should be set to Unix.
    • Install/Update > Automatic Updates, select "Automatically find new updates and notify me".

Step 4: Installing Plugins

General advice:

  1. Always use the Update Manager, as described in the steps below. (Many plugins can also be installed by downloading a zip and extracting it in your Eclipse installation directory. This is a bad idea.)
  2. Make sure Eclipse is installed in a location that does not have spaces in the path. (C:\Program Files\Eclipse can be a bad choice. Using C:\Eclipse\v3.4-Ganymede, for example, is a safer bet.)

Each plugin is installed separately. Some plugins are part of the main Eclipse project, while others come from an independent third party. Installing a plugin involves following these steps:

  1. Help > Software Updates... > Available Software, find the update site for the plugin being installed. If the update site is from a third party, it needs to be added by clicking "Add Site" and entering the appropriate URL (see below)
  2. Expand the tree below the update site and select the appropriate plugin(s), then click "Install..."
  3. Accept the liscense and click Finish
  4. Restart Eclipse

Follow the steps given above for each plugin listed below:

Plugin Eclipse Communication Framework (ECF)
Update Site Ganymede > Communications
Installation Notes Both the ECF Application and Core API plugins should be selected for installation.
Configuration Notes The ECF provides a perspective called Communications. The Communications perspective includes a button (which looks like ECF new connection icon) in the main toolbar for "Connect to Provider". Clicking that button allows you to connect to an existing IM account. The ECF supports XMPP (used by Jabber, Google talk, and iChat), BitTorrent, IRC, and MSN.
Usage Notes When connected to your IM account, your available contacts are shown. You can share a file and simultaneously edit a shared file with a contact if they are also using ECF.
Plugin FindBugs
Update Site http://findbugs.cs.umd.edu/eclipse/
Installation Notes FindBugs appears to be sensitive to Eclipse being installed in a location that contains spaces in the path. If selecting a feature to install generates an error like "Current configuration problems", try moving the Eclipse installation directory somewhere without spaces in the path.
Configuration Notes
Usage Notes You can run FindBugs manually by right-clicking on a project, then selecting FindBugs from the context menu. Alternatively, you can setup FindBugs to run automatically, every time a file is modified: Right-click on a project, Properties > FindBugs, then select "Run FindBugs automatically". Note that this setting is project-specific, so it has to be repeated for each project individually.
Plugin Checkstyle
Update Site http://eclipse-cs.sourceforge.net/update
Installation Notes
Configuration Notes The checking configuration used by Checkstyle should be set to conform to coding practices in this class. Go to Window > Preferences > Checkstyle, and create a new "Remote Configuration", using the following location: http://www.cse.ohio-state.edu/~rountev/421/resources/cse421Style.xml Aside: This configuration file is just the "Sun Checks (Eclipse)" built-in configuration with the following warnings disabled/modified:
  1. Javadoc > Package HTML
  2. Size Violations > Maximum Line Length (changed trigger-point of warning from 80 to 90)
  3. Coding Problems > Hidden Field
  4. Miscellaneous > Final Parameters
Usage Notes You can run Checkstyle manually or automatically (ie every time a file is modified). Both options are available by right-clicking on a project, then selecting Checkstyle from the context menu.