• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to install Groovy on Ubuntu 20.04 LTS

June 22, 2020 by Sharad Chhetri Leave a Comment

Apache Groovy is a Object Oriented programming language which is compatible with Java syntax.It is both static and dynamic language. You can use the Apache Groovy either as a scripting or programming language.

As a DevOps engineer, you might have known the use of Groovy script in Jenkins Pipeline.

Requirement

1. Groovy 3.x (At the time of writing this is the stable latest version)
2. JDK 1.8+ (Java version more than 1.8)

Install OpenJDK

For Java, we will install OpenJDK. Here we will install OpenJDK-14 version. If you want to install some other OpenJDK version, first check which OpenJDK version is available in Ubuntu Repo – to find, use command sudo apt search openjdk for this.

a. Open the terminal. Click on ‘Activities’ and in search type ‘terminal’ then click on ‘Terminal’ icon.

b. Install OpenJDK 14 version

sudo apt install openjdk-14-jdk*
sudo apt install openjdk-14-jre*

c. Set the environment for Java. For this, edit the file .bashrc of login user.

vi ~/.bashrc

Add these two lines at the end of line ~/.bashrc

export JAVA_HOME=/usr/lib/jvm/java-14-openjdk-amd64/
export PATH=$JAVA_HOME/bin:$PATH

d. Apply the Java environment without reboot.

source ~/.bashrc

Now move to section, “How to install Groovy 3.x”

How to install Groovy 3.x

To make the things simple in Ubuntu 20.04 LTS, we will use the snap package managee.

a. Open the terminal. Click on ‘Activities’ and in search type ‘terminal’ then click on ‘Terminal’ icon.

b. Run the given below command to install Groovy 3.x.

sudo snap install groovy --classic

c. Once installed, check the Groovy version by hitting the command – groovy --version

Output from our system:

sharad@linuxworld:~$ groovy --version
Groovy Version: 3.0.4 JVM: 14.0.1 Vendor: Private Build OS: Linux
sharad@linuxworld:~$ 

To open Groovy Console, go to ‘Activities’ and in search type ‘Groovy’. Click ‘Console For Ap…’ icon. It will open the Groovy Console.
groovy console

You can write in Groovy Console and run the code.

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. How to install Jenkins on Ubuntu 18.04 LTS server
  2. Upgrade Ubuntu 14.04 LTS to Ubuntu 14.04.3 LTS
  3. How to install iredmail with mysql in Ubuntu 12.04 LTS
  4. How to install and configure FTP server with chroot in Ubuntu 12.04 LTS
  5. How to install nagios server in Ubuntu 12.04 LTS
  6. Install and configure nagios core 4 on Ubuntu 12.04 LTS
  7. Install latest Google Chrome in Ubuntu 14.04 LTS (Trusty Tahr)
  8. How to install wordpress on LAMP stack ( Ubuntu 14.04 LTS Server )
  9. Install MariaDB Server 10.0 on Ubuntu 14.04 LTS ( Trusty Tahr )
  10. Install Eclipse Oxygen on Ubuntu 16.04 LTS desktop

Filed Under: Devops, Linux Tagged With: devops, groovy

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Subscribe to Blog via Email

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

Linux Commands

semanage command not found in CentOS 6 and RHEL 6

man command not found in CentOS and Red Hat

There are unfinished transactions remaining. You might consider running yum-complete-transaction

vi : Edit file without opening it

Linux: Set user password by using encrypted password in command

grep command to remove commented lines

yum : how to find rpm package which has certain command or file

Explore 70+ Articles On Linux Commands

Always Useful Tips And Tricks

How to configure htdigest in nagios server

Virtual Machine inaccessible status on VirtualBox 4.3

Allow wget and yum in iptable

How to convert rpm file into deb file

How to see line numbers in file through cat command

Edit the crontab without using crontab -e

How to add/install Ubuntu fonts in CentOS/Red Hat Linux

Explore 90+ Article On "Linux Tips And Tricks"

You Might Like These Articles!

Internal External Command

What is Linux/Unix Internal And External Command

Linux basic command

Linux Basic Commands For Every Beginner

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission but Schools and Colleges can do in their Private Network
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy