How to set up your machine for Groovy & Grails development
The set up
In order to be able compile and run java, groovy, and grails applications from the command line you will need to add the path to the binaries to the Environment variables (Right click on “My Computer” icon, click on the “Advanced” tab, the “Environment Variables” button should be at the bottom.
- Install JDK 1.6
- Download latest JDK from http://java.sun.com
- Create a JAVA_HOME system environment variable
- Append ;%JAVA_HOME%\bin; to the Path environment variable
- Install latest Groovy
- Download the latest groovy from http://groovy.codehaus.org/Download
- Create a GROOVY_HOME system environment variable
- Append ;%GROOVY_HOME%\bin; to the Path environment variable
- Install Grails
- Download the latest grails from http://www.grails.org/Download
- Create a GRAILS_HOME system environment variable
- Append ;%GRAILS_HOME%\bin; to the Path environment variable
The environment variables set up should look like this (Replace the Value accordingly based on the location of your install).
The Path in your system environment variables as well should look as follows:
Note: You can copy paste this and append it at the end of your Path variable, be very careful and do not delete any existing entries unless you know what you are doing
Open up a command prompt and type the commands below.
- java -version
- groovy -v
- grails -version
If you installed all three components correctly, you should see something very similar to this screen shot.