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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like