Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » How to install Groovy on Linux and Windows
  • Run Linux on Windows Server
    How to install Windows Subsystem for Linux on Windows Server Linux
  • AWS Principals
    MFA on Root Account: Create a User on AWS and Register MFA AWS/Azure/OpenShift
  • VBAWS comprehensive guide
    Deep Dive into Protecting AWS EC2, RDS Instances and VPC AWS/Azure/OpenShift
  • images
    AWS Network Adapter: Redhat to Citrix PV and AWS PV Driver AWS/Azure/OpenShift
  • how to Configure Autologin for a VM in VMware Workstation
    Configure Autologin for a VM in VMware Workstation Virtualization
  • Add User to Slack
    How to add a user to the Slack workspace JIRA|Confluence|Apps
  • PUA copy
    Enable or disable Reputation-Based Protection on Windows 10 and 11 Network | Monitoring
  • Cross Domain Folders Access
    Cross Domain Folders Access: Reference account is Locked out Windows

How to install Groovy on Linux and Windows

Posted on 15/11/202216/12/2023 Imoh Etuk By Imoh Etuk No Comments on How to install Groovy on Linux and Windows
How to install Groovy on Linux and Windows

Introducing the world of Groovy! As an object-oriented language for the Java platform, Groovy Installation Guide becomes your gateway to exploring its dynamic nature. Just like Python, Ruby, Smalltalk, and Pero, Groovy shares many features with these languages. For Groovy source code to seamlessly run on any JRE-equipped platform, it undergoes conversion into Java Bytecode. Dive into this comprehensive Guide to learn how to install Groovy on Linux and Windows today. Please see How to Switch between Users in Linux, how to use Systemd Timers on Linux, How to Install PlayonLinux on a Linux System.

Moreover, its JVM-based Scripting Language aspect contributes to heightened agility and dynamism, handling tasks in the background. Unlock the potential of Groovy as a scripting language for Java, almost resembling a supercharged Java version with additional corporate features.

Groovy offers several productivity tools including dynamic typing, closures, and DSL support. It is not intended to replace Java, but rather to work in conjunction with it, unlike some other languages.

For the Java virtual machine Java virtual machine (JVM), JVM-based Scripting Language is a dynamic object-oriented programming language that may be used anywhere Java is used. Additionally, this language can be used to create new programs, extend already-existing Java applications, and integrate Java components.

In addition, as a developer, you are constantly looking for ways to improve application features. If you mostly work on Java-based applications, get to know and install Groovy on your Linux and Windows machine.

The Groovy language seamlessly integrates with any Java program and adds powerful features such as scripting capabilities for Java programs. In this post, you’ll learn how to install JVM-based Scripting Language on either an Ubuntu or a Windows machine.

Why Groovy?

Here, are major reasons why you should use and learn JVM-based Scripting Language

  1. Groovy is an agile and dynamic language
  2. Seamlessly integration with all existing Java objects and libraries
  3. Feels easy and natural to Java developers
  4. More concise and meaningful code compares to Java
  5. You can use it as much or as little as you like with Java apps

See also Linux Shell Scripting: How to write a Shell Script that Counts Lines and Words in a File, and Microsoft releases Linux Desktop Management Support to Intune.

Installing Groovy on Linux Ubuntu

Since Groovy runs on its built-in Java servlet container server, you must first install Java on your Ubuntu machine before installing JVM-based Scripting Language. Also, when working with a JVM-based Scripting Language, you can use a variety of Java implementations, the most popular of which is OpenJDK. To install Java on your Ubuntu machine, follow these steps:

Step 1: Launch your favorite SSH client and connect to your Ubuntu machine using the pattern shown below:

ssh -i ~/.ssh/<keyname>.pem username@<PublicIPAddress>

Step 2: Use the apt update command to update your system packages.

$sudo apt update
sudo-update
Updating system packages

Step 3: After updating your system packages, run the following commands to create a directory (mkdir) named ~/ groovy_demo_install and change directory (cd) to that directory.

These commands produce no output, but the /groovy_demo_install the directory is where Java is installed.

$sudo mkdir ~/ groovy_demo_install && cd ~/groovy_demo_install
mkdir-and-cd-into-it

Steo 4:  Now, run the apt install command below to install Java (default-jdk) on your machine.

# Installing Java Version: Java SE 11 (LTS)
sudo apt install default-jdk 

Immediately after the installation is complete, run the command below to check the Java version installed in your machine:

Done
Java-Version-Installed
Installing Java 11 Version

The output above shows that you’ve successfully installed Java.

Step 5: Next, run the below command to install JVM-based Scripting Language on your machine

$sudo apt install groovy
Installed-Groovy
Installing Groovy

Verify the version of the Groovy you just installed by running:

groovy --version
Check-Groovy-Version
Groovy version

Executing a JVM-based Scripting Language Script on Ubuntu

Awesome! Groovy has been successfully installed on your Ubuntu machine. But how do you know JVM-based Scripting Language is effective?

In this example, you will run a test by executing a simple script to determine whether JVM-based Scripting Language is properly installed.

Within the ~/groovy_demo_install directory, create a script named demo.sh which when executing prints (printLn) all the numbers starting from 0 to 4 as shown below:

#!/bin/bash
0.upto(4) {println "$it"}
Execute-script

Get Groovy on Windows

Windows users can also so enjoy using Groovy. Begin by following our comprehensive Groovy installation guide. Install Groovy on your Windows PC and unlock its power. Just a few steps away – let’s get started!

Step 1: Open JVM-based Scripting Language official website, click on the download tab and scroll down to the download section and then select “Windows Installer” under the stable release, JVM-based Scripting Language 4.0 as shown below:

Install-on-Windows-1
Download Groovy

Step 2: Click on the .msi installer’s link at the right-side of the screen to download Groovy

click-on-download-groovy
Download Groovy

Step 3: After downloading it, go to your download folder and run Groovy’s Windows installer.

Groovy-Setup-Downloaded
Groovy Setup Downloaded

Step 4: Click on Next when you see the “welcome” page as shown below.

Click-next-to-install-groovy
Installing Groovy

Step 5: Ensure you select the checkbox at the bottom to accept the End-User License Agreement (EULA), and click Next to continue.

Accept-EULA
Accept End-User License Agreement

Step 7:  On the next screen, select the Groovy setup as Typical and click on Next. Selecting Typical Installation type, installs only the common features.

Select-Typical-Installation-type
Selecting Installation Type as Typical

Step 8: Click on Install to run the installation

Install-groovy-now

The next screen shows you the installation progress.

Groovy-Installation-in-Progress
Groovy Installation in progress

Finally, Groovy installation is complete. Click on Finish to quit the setup window

Groovy-Installation-complete
Groovy Installation completed

Running a JVM-based Scripting Language Command on Windows

Now that Groovy is installed on your Windows computer, everything ought to function as it should. You must, however, verify that JVM-based Scripting Language functions properly in order to be safe. How?

You’ll run a Groovy command on your Windows machine, much like you did on Ubuntu. But to execute commands, you’ll utilize theJVM-based Scripting Language Shell rather than Windows PowerShell.

Now, launch JVM-based Scripting Language shell from your Desktop or the Start menu, as shown below.

Launch-Groovy-Shell-on-Desktop
Launch Groovy Shell

Let’s run the below command to print all numbers (printLn) between 0 and 10 with an increment of 3.

Run-Command-on-Windows-Groovy-Shell
Running a Groovy command to print specific numbers

You learned how to install Groovy, a versatile language for the Java platform, on Ubuntu and Windows in this guide. We mentioned running a JVM-based Scripting Language command and launching a JVM-based Scripting Language script, both of which perform related tasks.

I hope you found this blog post on installing Groovy on Linux and Windows helpful. If you have any questions, leave a comment below.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Configuration Management Tool, Linux, Windows Tags:Ubuntu

Post navigation

Previous Post: Write a Shell Script that Count Lines and Words in a File
Next Post: Enable vTPM and BitLocker HyperV VM: Fix the device that cannot use a TPM module

Related Posts

  • Creating a WinPE USB Drive Fixing System Boot Issues
    Creating a WinPE USB Drive: Fixing System Boot Issues Windows
  • SSD Trim and Disable delete operaion from ending up in Recycle bin
    SSD TRIM: Delete files permanently without using the Recycle Bin Windows
  • banner 1
    How to use the Program Compatibility Troubleshooter to Test Application Compatibility on Windows 11 Windows
  • fba7f screenshot 2019 04 15 at 18.33.30
    File System Overview: How to decide on the right File System to use for your USB Linux
  • Screenshot 2020 05 14 at 19.43.13
    Repo: How to setup Chef Repository Configuration Management Tool
  • PRIVATE DOCKER REGISTRY
    How to Set up Private Docker Registry Containers

More Related Articles

Creating a WinPE USB Drive Fixing System Boot Issues Creating a WinPE USB Drive: Fixing System Boot Issues Windows
SSD Trim and Disable delete operaion from ending up in Recycle bin SSD TRIM: Delete files permanently without using the Recycle Bin Windows
banner 1 How to use the Program Compatibility Troubleshooter to Test Application Compatibility on Windows 11 Windows
fba7f screenshot 2019 04 15 at 18.33.30 File System Overview: How to decide on the right File System to use for your USB Linux
Screenshot 2020 05 14 at 19.43.13 Repo: How to setup Chef Repository Configuration Management Tool
PRIVATE DOCKER REGISTRY How to Set up Private Docker Registry Containers

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Run Linux on Windows Server
    How to install Windows Subsystem for Linux on Windows Server Linux
  • AWS Principals
    MFA on Root Account: Create a User on AWS and Register MFA AWS/Azure/OpenShift
  • VBAWS comprehensive guide
    Deep Dive into Protecting AWS EC2, RDS Instances and VPC AWS/Azure/OpenShift
  • images
    AWS Network Adapter: Redhat to Citrix PV and AWS PV Driver AWS/Azure/OpenShift
  • how to Configure Autologin for a VM in VMware Workstation
    Configure Autologin for a VM in VMware Workstation Virtualization
  • Add User to Slack
    How to add a user to the Slack workspace JIRA|Confluence|Apps
  • PUA copy
    Enable or disable Reputation-Based Protection on Windows 10 and 11 Network | Monitoring
  • Cross Domain Folders Access
    Cross Domain Folders Access: Reference account is Locked out Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,832 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.