Appendix C. Installing alternative JVM languages
This appendix covers the download and installation instructions for the three JVM languages (Groovy, Scala, and Clojure) as well as the Groovy-based web framework (Grails) covered in chapters 8, 9, 10, and 13 respectively.
Groovy is fairly simple to install, but if you’re unfamiliar with setting environment variables or you’re new to your particular operating system, you should find this guide helpful.
First of all, go to http://groovy.codehaus.org/Download and download the latest stable version of Groovy. We used Groovy 1.8.6 for the examples, so we recommend downloading the groovy-binary-1.8.6.zip file. Then unzip the contents of the zip file you downloaded into a directory of your choosing.
Warning
As in many Java/JVM-related software installations, it pays to not install Groovy into a directory with spaces in the path, because you might get PATH and CLASSPATH errors. For example, if you’re using an MS Windows operating system, don’t install Groovy into a directory that looks like C:\Program Files\Groovy\.
There aren’t many steps to go. Next you need to set environment variables.
After downloading and unzipping, you’ll need to set three environment variables to be able to run Groovy effectively. We’ll look at both the POSIX-based operating systems (Linux, Unix, and Mac OS X) as well as Microsoft Windows.