The Apache Groovy programming language - A multi-faceted language for the Java platform
What is Groovy?
Apache Groovy is a powerful, multi-paradigm programming language for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax. It integrates smoothly with any Java libraries, and delivers powerful enhancements and productivity features, including scripting capabilities, Domain-Specific Language authoring, runtime and compile-time meta-programming and functional programming.
Why use Groovy?
Groovy is like a super version of Java:
It supports most Java syntax but allows simpler syntax for many constructs
It supports all Java libraries but provides many extensions and its own productivity libraries
It has a dynamic nature like Python, which means that it is very powerful, easy to learn, and productive
It optionally has a static nature like Java and Kotlin, which makes it fast and provides extra type checking when desired
It has first-class functional, stream processing and immutability support, meaning that it offers features similar to Scala and can offer many advantages when working in parallel processing or clustered environments
It has great extensibility for the language and tooling
It is free and open source and has a large community of users and developers around the world.
Groovy 2.5.x (3.0.x) requires Java 7 (8) or a later runtime environment to be installed. Depending on what you are planning to do, you may need a Java Development Kit rather than just a Java Runtime Environment.
For versions of Ubuntu between 14.04 LTS (Trusty Tahr) and 15.10 (Wily Werewolf), as well as Ubuntu flavours that don’t include snap by default, snap can be installed from the Ubuntu Software Centre by searching for snapd.
Alternatively, snapd can be installed from the command line:
sudo apt update
sudo apt install snapd
Either log out and back in again, or restart your system, to ensure snap’s paths are updated correctly.
Install Apache Groovy Programming Language
To install Apache Groovy Programming Language, simply use the following command: