Tropical Software Observations

18 April 2009

Posted by Teo Choong Ping

at 11:23 AM


Labels: ,

Install Groovy 1.6.1 on Windows -- A guide for the non-Java developer

* This is a quick guide on installing the latest Groovy 1.6.1 in Windows for non-Java developers.

1. Download and install Java SDK 1.6.x. Get the latest installer from Sun here. If this is your first time downloading Java, you are going to be confused with the various JDK 6 Updates packages -- JDK 6 Update with JavaFX SDK, JDK Update with Java EE, JDK Update with NetBeans 6.5.x. If unsure just look for the package without any of those extras -- Java 6 Update 13.

2. Download Groovy 1.6.1 installer from Groovy site. We will just use the Windows installer.

3. Double click on the Groovy installer and follow the wizard steps.

4. Use the defaults settings -- create GROOVY_HOME, add to PATH and add to System environment.

5. Make sure you have set JAVA_HOME environment. Right click on "My Computer", select "Properties". Click on the "Advance" tab and then click on the "Environment Variables" at the bottom of the window.

6. Add JAVA_HOME to User Variables. Click "Add" and enter the name as JAVA_HOME and value set to the full path to your Java JDK directory, e.g., C:\Program Files\Java\jdk1.6.0_13.

7. Continue with the Groovy installation wizard -- click next and use the defaults settings for native launcher and use all the Additional Modules.

8. Once finished, you should be able to see a new Groovy menu in Program list.

9. Lets give it a try. Select "Start GroovyConsole" to run GroovyConsole. If all goes well, you should be able to see the GroovyConsole up.

10. There are 2 useful keyboard shortcuts to know for GroovyConsole:

  • Cntrl+Enter = Run the groovy code
  • Ctrl+w = Clear console output


kenst2green said...

I've found from other sources that when install Groovy, the file path and location folder should not have a space. Thus putting in the Program Files folder is problematic and prevents the Console from opening from the Start Menu and exe file. Instead, install Groovy in the file path something like c:\Groovy\Groovy-1.7.6\