How to Install Groovy on Windows or Mac in 2025?


Installing Groovy, a versatile and dynamic language for the Java platform, on your system can significantly enhance your programming capability. This guide will walk you through the installation steps for Groovy on both Windows and Mac operating systems in 2025.

What is Groovy?

Groovy is an agile and dynamic language for the Java Virtual Machine (JVM). It combines powerful features from languages like Python, Ruby, and Smalltalk with Java’s robust ecosystem. Groovy is ideal for scripting, rapid prototyping, and creating Domain-Specific Languages (DSLs).

Installing Groovy on Windows

Step 1: Set Up SDKMAN

  1. Open Command Prompt: Press Windows + R, type cmd, and hit Enter.

  2. Install SDKMAN:

    • Execute the following command:
      curl -s "https://get.sdkman.io" | bash
    • Follow the instructions to complete the installation.
  3. Initialize SDKMAN: Run

    sdk version

    to verify that SDKMAN is installed.

Step 2: Install Groovy

  1. Use SDKMAN to Install Groovy:

    • Run the following command:
      sdk install groovy
    • Wait for the installation to complete.
  2. Verify Groovy Installation:

    • Execute:
      groovy -version
    • Ensure that it displays the installed Groovy version.

Installing Groovy on Mac

Step 1: Install Homebrew

  1. Open Terminal.

  2. Install Homebrew:

    • Execute:
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    • Follow the on-screen instructions to complete the installation.
  3. Verify Homebrew Installation:

    • Run:
      brew -v
    • Check the displayed version information.

Step 2: Install Groovy

  1. Install Groovy Using Homebrew:

    • Use the following command:
      brew install groovy
    • Allow the installation process to finish.
  2. Confirm Groovy Installation:

    • Execute:
      groovy -version
    • Verify the installed version number.

Post-Installation Troubleshooting

After installing Groovy, you might encounter some common issues. Here are links to resources that can help you troubleshoot:

By following these steps, you can easily set up Groovy on your Windows or Mac system in 2025, enabling you to develop powerful applications with ease.