Java Reference
In-Depth Information
sites for years and have never had a problem with it. It will, by the way, notify you if you
don't have a JAVA_HOME environment variable set.
If you're on a Mac or other Unix box, you have other convenient alternatives available.
First, there's a MacPorts ( www.macports.org ) option. Run
$ sudo port install groovy
That will download and install the latest version. If you prefer HomeBrew ( ht-
tp://mxcl.github.io/homebrew ) , the relevant command is
$ brew install groovy
That, too, will download the latest version, install it, and create soft links to the executable
scripts in your path.
The other major alternative is to use GVM, the Groovy enVironment Manager ( ht-
tp://gvmtool.net ) . This is the best option if you plan to switch versions at any time. GVM
is installed using curl , with this command:
$ curl -s get.gvmtool.net | bash
GVM assumes you are using a bash shell, but the same process works for most Unix fla-
vors. It also works on Windows if you install Cygwin. See the web page for details.
The great advantage of GVM is that it makes switching versions almost trivially easy. If
you have GVM installed, you can find out which versions of Groovy are available by typ-
ing
$ gvm list groovy
You can install the latest one like this:
$ gvm install groovy
If you supply a version number to the install command, you can select which version
of Groovy to install. You can switch from one version of Groovy to another using
Search WWH ::




Custom Search