How to Set Groovy_Home Environment Variable on Ubuntu

I am a novice, who is new to Linux and I am trying to set GROOVY_HOME environment variable. Note sure if this is the right step:

GROOVY_HOME='/usr/share/groovy'

Also trying to add $GROOVY_HOME/bin to my $PATH environment variable, but I am not too sure on how to do this. Any ideas/steps on what to do would be appreciated.

2

1 Answer

Create the file /etc/profile.d/groovy.sh by opening a terminal window and running this command:

sudo -H gedit /etc/profile.d/groovy.sh

Give the file this contents:

export GROOVY_HOME=/usr/share/groovy
PATH="$PATH:$GROOVY_HOME/bin"

Then save, log out and log in again.

6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest