in scala sbt macosx installation ~ read.

Easy steps to install Scala and SBT on your Mac

So, i had to setup Scala and SBT real quick on my Mac and had to google it again:) Since i try to keep in this blog all the handy tricks and manual i find in the web during my work, i think that this topic should be also covered here as well. So, you have 2 options to install scala and sbt on your mac :

  • Use brew
  • Install manually

Let's take a look at the first option.

  • First you need to install brew, if you don't have it yet.
ruby -e "$(curl -fsSL 
https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Then you can install both scala and sbt in one simple command
brew install scala
brew install sbt

And that will be it. Another way of doing it is a manual approach. To install scala on your laptop you need to do next :

  • Download scala binary from this link
  • Unpack archive and put scala folder into /usr/local/
  • Add to your .bashrc file export of /usr/local/scala/bin folder to your PATH

For sbt the approach will be a little different

cd ~
https://simple-build-tool.googlecode.com/files/sbt-launch-0.7.7.jar
sudo mv sbt-launch-0.7.7.jar /usr/local/bin/sbt-launcher.jar
echo "java -Xmx512M -jar /usr/local/bin/sbt-launcher.jar \"\$@\"" | 
sudo tee /usr/local/bin/sbt
sudo chmod +x /usr/local/bin/sbt

And that's it. If you did everything properly, then you should see next for scala :

scala
Welcome to Scala version 2.11.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_67).
Type in expressions to have them evaluated.
Type :help for more information.

scala>

And for sbt it should be like :

sbt
Project does not exist, create new project? (y/N/s)
comments powered by Disqus
comments powered by Disqus