Installing Groovy is not much different from the other languages covered so far. Using your favorite browser, visit its home page at http://groovy-lang.org:
Here's the installation procedure:
- From the home page, find the
Download
section. - Click the prominent
Download
button. This will start the download of a ZIP file. At the time of writing, this wasapache-groovy-sdk-2.4.10.zip
. - Extract the file to a convenient place on your system and add its
bin
directory to your system's path.
Groovy is bundled with two REPL environments: the GUI-based GroovyConsole
and the text-based GroovyShell
. Let's validate the installation by launching the GUI application, GroovyConsole
. After adding the bin
directory to the PATH of your system, as instructed earlier, launch a new Command Prompt (Windows) or Terminal window (macOS and Linux), and then run the following command:
GroovyConsole
This will launch the GroovyConsole. This is a convenient program to run small Groovy scripts, and we will use...