Categories: Uncategorized

Install Scala and Sbt

Scala is a kind of hybrid language which is object oriented and functional.
Sbt is build tool. Sbt provides management of project/package/library.

Environment

  • OS
    • Linux www4322gi 3.2.0-64-generic #97-Ubuntu SMP Wed Jun 4 22:04:21 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  • Scala
    • version: 2.11.1
  • Sbt
    • version: 0.13.5

Install Scala

wget http://downloads.typesafe.com/scala/2.11.1/scala-2.11.1.tgz?_ga=1.203129617.1867876236.1402137497
tar zxvf scala-2.11.1.tgz?_ga=1.203129617.1867876236.1402137497
sudo mv scala-2.11.1/ /usr/local/scala
vim ~/.bashrc
---
export PATH=$PATH:/usr/local/scala/bin
---
source ~/.bashrc
scala -version
---
Scala code runner version 2.11.1 -- Copyright 2002-2013, LAMP/EPFL
---

Install Sbt

sudo mkdir -p /usr/local/sbt/bin
sudo wget http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.5/sbt-launch.jar
sudo mv sbt-launch.jar /usr/local/sbt/
sudo vim /usr/local/sbt/bin/sbt
---
java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -jar `dirname $0`/../sbt-launch.jar "$@"
---
sudo chmod 755 /usr/local/sbt/bin/sbt
export PATH=$PATH:/usr/local/sbt/bin
vim ~/.bashrc
---
export PATH=$PATH:/usr/local/sbt/bin
---
source ~/.bashrc
sbt sbt-version
zuqqhi2