How to Install the Eclipse Groovy Plugin

March 5th, 2009

These instructions are from the official Groovy website.

Before you begin the installation, first make sure to a recent version of Eclipse.  I am using Eclipse 3.4.1 for my installation.

Installing the plugin from within Eclipse:

  1. Go to Help -> Software Updates
  2. Switch to the Available Software tab
  3. Click on Add Site
  4. In the Location text box paste this url: http://dist.codehaus.org/groovy/distributions/update/ and press OK
  5. Click the boxes next to the groovy features you would like installed and then click on the Install button
  6. Click Finish to go ahead with the install.

If you have any problems or encounter errors during the install, have no fear!  There is another way:

  1. Download the .zip from http://dist.codehaus.org/groovy/distributions/update/GroovyEclipse.zip
  2. Extract the content of the .zip into the Eclipse \plugins and \features directories.

The next time you restart Eclipse, you should have a working Groovy plugin.

Note: I have installed this plugin on multiple versions of Eclipse and have always had to use this second option.  The Groovy plugin has many dependencies within Eclipse that I can’t be bothered to track down and fix.  In the end, the .zip method still manages to get the Groovy plugin installed correctly.

How to install Groovy on Windows

March 2nd, 2009

Before installing Groovy make sure you have JDK 1.4 or above and that the JAVA_HOME system environment variable is set to the location of the installed JDK.

To install Groovy:

  1. Get the latest release of Groovy from http://groovy.codehaus.org/Download
  2. Unzip to a directory like C:\groovy
  3. Create a system environment variable GROOVY_HOME whose value is set to the location from Step 2
  4. Include %GROOVY_HOME%\bin in your PATH environment variable
  5. Test your installation by executing groovy -version

You should see output similar to:
C:\groovy\groovy-1.6.0>groovy -version
Groovy Version: 1.6.0 JVM: 1.6.0_10

Time to get Groovy!

If you do not see output like above and followed steps 1-5 correctly, try clearing the value saved in the CLASSPATH environment variable.

One small post for man…

February 24th, 2009

I heard there’s this newfangled thing on the internets called a weblog or “blog”.  Being the early-adopter that I am, I figured I’d give it a whirl and see if it takes off.  I’m probably just wasting my time.