Are you just getting started with Groovy? Then you will find important information on Groovy’s home page. It has Groovy news, events, articles, documentation, FAQs, and much more.
Here is a quick guide for installing Groovy and the Java development tools on your computer:
(1) Install the Java Development Kit (JDK) by going here (note: Apple developers should go here). The latest Java runtime (JRE) is included in the JDK.
(2) Install the Groovy development kit by following the instructions here (Windows developers should download the Windows-Installer). The latest version is 1.5.
(3) You will need an IDE (Integrated Development Environment) to develop your Groovy programs. Eclipse is a widely used platform with great support for Groovy. You can download and install it from here. In the section marked “Eclipse Classic,” select the download that matches your operating system.
(4) On Windows, you will want to create a shortcut to launch Eclipse with increased memory settings. Therefore, on Windows, open the desktop window to where Eclipse is installed (typically, "C:\eclipse\).
(4a) Right-click your mouse (over white-space within the window, not over an icon) and select “New” -> “Shortcut”.
(4b) On the Shortcut Wizard screen, select the “Browse..” button. Via the File Manager, locate the “eclipse.exe” program and select “OK” then “Next >”. (You can either leave the default name as is or change it to your own preference). Finally select “Finish.”
(4c) Right-click on the shortcut you created and select “Properties”.
(4d) Select the “Shortcut” tab and modify the “Target:” line by first adding a space after the path to the Eclipse runtime, and then appending the following string (you may have to modify it slightly):
-vm "C:\Program Files\Java\jdk1.6.0_05\jre\bin\javaw" -vmargs -Xmx200m -XX:MaxPermSize=128m
This example assumes that you have the JDK (Java Developer Kit) version 1.6_05. If you have a different version installed, replace the path “C:\Program Files\Java\ …” with the exact path to the Java runner “javaw”. Note that the path must be to the developer runtime (JDK) and not the end-user runtime (JRE). This change will launch Eclipse with increased memory necessary to compile, run, and test your Groovy programs. The final string should look something like this:
C:\eclipse\eclipse.exe -vm "C:\Program Files\Java\jdk1.6.0_05\jre\bin\javaw" -vmargs -Xmx500m -XX:MaxPermSize=128m
On a platform other than Windows, you will probably need to make similar configuration changes.
(5) To enable Groovy support in Eclipse, you will need to download the latest Groovy/Eclipse Plug-in here. On that Web page, you will also find simple instructions for creating Groovy projects with the plug-in. Furthermore, the Workbench User Guide will help you use the Eclipse Workbench.
To install the latest version of the Groovy plugin for Eclipse, select the http://dist.codehaus.org/groovy/distributions/updateDev/ site, not the “most resent release” site. In addition, if you had installed a prior release of the Groovy plugin, you may have to reinstall the Eclipse IDE from scratch, since we have found problems with upgrading with previous releases.
All the software described above is free software and you can download it without charge.
When you are done installing the Groovy development software, there is an excellent Getting Started Guide that will take you step-by-step in getting started with programming in Groovy. Other documentation can be found here.