Groovy - Getting started on Linux

An agile dynamic language for the Java Platform

1- Download groovy

Go to : http://groovy.codehaus.org/Download

  • Binary release
  • Documentation can be really usefull.

2- Setup your environment

If you are using TCSH, CSH :

# Groovy configuration
setenv GROOVY_HOME /home/dabuilder/tools/groovy-1.7.0
set path = ("$GROOVY_HOME/bin" $path)

Then, restart your shell.

3- Test

Check if groovy is present :

groovy -version

Create a script yourscript.groovy :

println "Welcome to groovy world !"

Try to run the script:

groovy yourscript.groovy

Create more advanced script : FIXME

#!//groovy
println "Welcome to groovy world !"