02 - Install Grails

1) Install Java Development Kit

2) Install Grails

Install Java Development Kit

Before even starting with Grails, you need to install a Java Development Kit (JDK) version 1.6 or above.

For the purpose of this tutorial we will be using Java 7 Update 45. You can download it from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html, agree to the terms and conditions and select your operative system.

Once the file is downloaded (i.e: jdk-7u45-windows-x64.exe), double click on the file to execute it and select Run.


When presented with the following screen, click Next to start the installation


On the following page, you can select where to install the JDK (i.e: D:\Java)

Once you have selected the destination folder for the JDK, click Next.

Once the JDK installation is complete, you can install the JRE.


And click Next.

Once it completes a success page should be displayed.


Install Grails

Go to http://grails.org/download and download the latest Grails version (For this tutorial Grails version is 2.3.4) and extract the content to D:\tutorial\grails-2.3.4


Set up environment variables

1) Go to Control Panel, and Select Advanced System Settings.

2) In System Properties, go to Advanced tab, and click on Environment Variables


3) Set up JAVA_HOME to the folder where you installed the JDK (i.e: D:\Java\jdk1.7.0_45)


4) Set up GRAILS_HOME to the folder where you extracted Grails package (i.e: D:\tutorial\grails-2.3.4)


5) Add the bin directory of Java and Grails to your PATH variable (i.e: %Path%;D:\tutorial\grails-2.3.4\bin;D:\Java\jdk1.7.0_45\bin)



Once you complete this setup, you can test if this works by opening a command line and executing the following commands: “java –version” and “grails –version”



Like us on Facebook