Note: GRAILS requires a Java JDK installed (a runtime environment JRE is not sufficient) on your system, before setting up Grails. Please refer to, how to install JDK. As of this writing, it is recommended to install the latest JDK.
For Mac OSX, Linux, Cygwin, Solaris and FreeBSD:
The simplest way to manage Grails versions is using sdkman.
If sdkman
is installed, you can then install any version of Grails using
sdk install grails [version]
This will take care of all steps to get this right. If you skip the version
, the latest version of grails will be installed. For more about using sdkman
, refer to sdkman usage page.
For Linux:
GRAILS_HOME=$HOME/bin/grails/current # abbreviating it using "..." for brevity PATH=$GRAILS_HOME/bin:$JAVA_HOME/bin: ... :$PATH
For Windows:
JAVA_HOME
and GRAILS_HOME
(for Windows 10 found under *Control Panel \ System and Security \ System \ Advanced System settings \ Advanced tab \ Environment Variables) *, pointing to the extracted directories, e.g.Name: JAVA_HOME
Value: C:\Programs\Java\jdk1.8.0_31
Name: GRAILS_HOME
Value: c:\grails\grails-3.2.4
PATH
variable to include both JAVA_HOME and GRAILS_HOME. The path variable is also found in then control panel (see 4), e.g. add the following at the end:;C:\Programs\Java\jdk1.8.0_31\bin;c:\grails\grails-3.2.4;c:\grails\grails-3.2.4\bin
GRAILS -VERSION
. You should get something like:| Grails Version: 3.2.4
| Groovy Version: 2.4.6
| JVM Version: 1.8.0_65