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.
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.
GRAILS_HOME=$HOME/bin/grails/current # abbreviating it using "..." for brevity PATH=$GRAILS_HOME/bin:$JAVA_HOME/bin: ... :$PATH
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.
PATHvariable 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:
GRAILS -VERSION. You should get something like:
| Grails Version: 3.2.4 | Groovy Version: 2.4.6 | JVM Version: 1.8.0_65