Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to set SCALA_HOME in linux

How to set SCALA_HOME in linux


Hi All,

I want to install scala in Linux as in sandbox centOS.

I have already downloaded scala-2.10.5 and also create a soft link for it in /us/hdp/current folder.

After that, I executed below commands to set PATH for SCALA_HOME.

echo "export SCALA_HOME = /usr/hdp/current/scala" 
echo "export SCALA_HOME = /usr/hdp/"

echo "export PATH=$PATH:$SCALA_HOME/bin" 

After that, I jumped at root directory in local and executed below command to execute .bashrc and .bash_profile files.

source ~/.bashrc 
source ~/.bash_profile 

I thought that is all. But I couldn't able to go into scala shell from anywhere.

Can anyone help me with this?



Re: How to set SCALA_HOME in linux

New Contributor


Create a new file in /etc/profile.d/ named “”. The full path should be “/etc/profile.d/”. Then, enter these next two lines in the file:

export SCALA_HOME="/path to your scala folder"

export PATH="$PATH:${SCALA_HOME}/bin"

Then you need to restart the system. That's all.