Skip to content
AgileLogics
4 min read

Installing Groovy

Groovy runs on the JVM, so you need a Java Development Kit (JDK) first. Groovy 6 requires Java 17 or newer; Java 21 or 25 (both long-term-support releases) are good choices. Check with:

$ java -version
openjdk version "21.0.12" 2026-07-21 LTS

SDKMAN! (macOS, Linux, WSL)

SDKMAN! installs and switches between versions of Java, Groovy, Gradle, and other JVM tools:

curl -s "https://get.sdkman.io" | bash
sdk install java 21.0.12-tem
sdk install groovy

Windows

scoop install groovy
choco install groovy

Or download the binary distribution zip from groovy.apache.org, unzip it (for example to C:\groovy), set GROOVY_HOME to that folder, and add %GROOVY_HOME%\bin to your PATH. Make sure JAVA_HOME points to your JDK.

macOS with Homebrew

brew install groovy

Check it works

$ groovy --version
Groovy Version: 6.0.0 JVM: 21.0.12 Vendor: Eclipse Adoptium OS: Windows 11

Linux distribution packages are often several versions behind — prefer SDKMAN! there.

Try it without installing

The Groovy Web Console (groovyconsole.dev) runs Groovy scripts in your browser, handy for trying the examples in this course.