Groovy is an object-oriented, dynamic programming language designed on the Java platform. Run on the JVM just like Java.
First, download the binary installation package on the Groovy website: http://www.groovy-lang.org/download.html
Groovy-binary-2.4.3.zip
Extract.. Here I unzip it into the/OPT directory.
Configure environment variables: Add at the end of the/etc/profile file
#set Groovy Environment
Export Groovy_home= "/opt/groovy-2.4.3"
Export path= $GROOVY _home/bin: $PATH
If you do not configure Java_home, you also need to add the Java_home
OK, it's done here.
Test it:
[Email protected]:~$ source/etc/profile
[Email protected]:~$ groovy-version
Groovy version:2.4.3 jvm:1.8.0_31 vendor:oracle Corporation os:linux
You can also run code with the groovy console. is a lightweight IDE
Execute the Groovyconsole in the terminal to open:
Installing the groovy environment under Linux