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 ?
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 .
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.
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.
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
For me its: /usr/share/java/scala
I determined this by doing dpkg -L scala
This assumes you install scala using APT.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With