I have installed sbt using the instructions in Installing sbt on Linux.
$ sbt --version
sbt launcher version **0.13.8**
$ sbt console
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.4 (OpenJDK 64-Bit Server VM, Java 1.7.0_79).
How to configure (or update) sbt so that sbt console
uses the latest Scala version 2.11.6?
It is recommended to explicitly specify the version of Scala. sbt adds a dependency on the Scala standard library by default. To disable this behavior, set the autoScalaLibrary setting to false. To set the Scala version in all scopes to a specific value, use the ++ command. For example, to temporarily use Scala 2.10.4, run:
The scalaVersion configures the version of Scala used for compilation. By default, sbt also adds a dependency on the Scala library with this version. See the next section for how to disable this automatic dependency. If the Scala version is not specified, the version sbt was built against is used.
To set the Scala version in all scopes to a specific value, use the ++ command. For example, to temporarily use Scala 2.10.4, run: Defining the scalaHome setting with the path to the Scala home directory will use that Scala installation. sbt still requires scalaVersion to be set when a local Scala version is used. For example, See cross building .
The Scala Web Site ( downloads here) provides a variety of installers and tarballs / Zip archives for every release they've made. Mac OS X users can use HomeBrew to get up-to-date SBT and Scala. Indeed, setting scalaVersion is an easy way to get test out a new version before you commit to upgrading.
Create a build.sbt
file and enter the scalaVersion
:
scalaVersion := "2.11.5"
Run sbt console
in the same directory with your build.sbt
and it will load the version you specified.
...:sbttest/ $ sbt console [10:55:53]
[info] Loading global plugins from /home/.../.sbt/0.13/plugins
[info] Set current project to sbttest (in build file:/tmp/sbttest/)
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.11.5 (OpenJDK 64-Bit Server VM, Java 1.7.0_79).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
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