Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is SCALA_HOME on Ubuntu?

I installed Scala on Ubuntu using the following

sudo apt-get install scala   ~$ which scala /usr/bin/scala  ~$ whereis scala scala: /usr/bin/scala /usr/bin/X11/scala /usr/share/man/man1/scala.1.gz  ~$ scala -version Scala code runner version 2.9.1 -- Copyright 2002-2011, LAMP/EPFL 

My question is what should I put in the variable SCALA_HOME? /usr/bin ?

like image 270
Soumya Simanta Avatar asked Apr 02 '13 20:04

Soumya Simanta


People also ask

Where is Scala installed on Ubuntu?

Try using SCALA_HOME=/usr/share/java . There's a possibility may need to symlink specific jars from that directory into /usr/share/java/lib .

How do I set Scala path in Linux?

Append the full path of Java compiler location to the System Path. Append the String "C:\Program Files\Java\jdk1. 7.0_60\bin" to the end of the system variable PATH. Execute the command java -version from the command prompt as explained above.

How do I get Scala path?

Finding Scala and setting the PATH variable It is probably the case that Scala is installed in the folder, C:\Program Files (x86)\scala\bin, and within that folder, there are programs named scala. bat and scalac. bat (or scala.exe...). The path to Scala is therefore C:\Program Files (x86)\scala\bin.


2 Answers

Today I installed scala using "apt-get install scala" and confirmed the scala jar files are located in /usr/share/java

You should be able to set your SCALA_HOME to /usr/share/java and have it all work. I assume you want to use NetBeans so you will need to set SCALA_HOME in your .profile (or .bash_profile) rather than in your .bashrc because NetBeans won't see any variables set in your .bashrc unless you start it from the command line

$ find / -maxdepth 6 -iname \*scala\*jar 2> /dev/null /usr/share/java/scala-dbc.jar /usr/share/java/scala-partest.jar /usr/share/java/scala-partest-2.9.1.jar /usr/share/java/scala-dbc-2.9.1.jar /usr/share/java/scalacheck.jar /usr/share/java/scalap.jar /usr/share/java/scala-library-2.9.1.jar /usr/share/java/scala-compiler-2.9.1.jar /usr/share/java/scala-library.jar /usr/share/java/scalacheck-2.9.1.jar /usr/share/java/scala-compiler.jar /usr/share/java/scala-swing-2.9.1.jar /usr/share/java/scalap-2.9.1.jar /usr/share/java/scala-swing.jar 
like image 118
Tim Perry Avatar answered Oct 14 '22 13:10

Tim Perry


For me its: /usr/share/java/scala I determined this by doing dpkg -L scala

This assumes you install scala using APT.

like image 21
Jeremy Avatar answered Oct 14 '22 12:10

Jeremy