Installing Multiple Groovy Versions using SDKMan in Ubuntu

Installing Multiple Groovy Versions using SDKMan in Ubuntu

Hello friends. SDKMan is a great tool for Software Development Kit Management and today we will be Installing Multiple Groovy Versions using SDKMan in Ubuntu.

The process is very simple and you will be requiring SDKMan to be installed before we proceed and hence you can follow our article on Installing SDKMan in Ubuntu in order to get it installed.

Once you have the SDKMan installed in your machine, execute the following command to list all the Groovy versions:

sdk list groovy

It will list all the installed Groovy versions as shown like the below screenshot:

Listing All Installed Groovy Versions Using SDKMan

To install specific Groovy version and switch to that version, execute the following command:

sdk install groovy 2.4.17

This will install the Groovy 2.4.17 and will set it as the default version.

You can verify the Groovy version by executing the following command:

groovy --version

If you want to switch the Groovy version only for the current shell window, you can use the following command:

sdk use groovy 2.4.16

If you want to change the Groovy version permanently, then need to use the default command for this switch over:

sdk default groovy 2.4.16

You can follow our article on Installing Java OpenJDK in Ubuntu to install the Java as it is also required for Groovy to function.

Related Posts