Question

I've just installed the Typesafe Stack and am now trying to install SBT via the instructions on the SBT github page.

However, the SBT installer does not recognize that Scala is already installed, and tries to download a fresh version:

ubuntu@ip-10-120-65-227:~/bin$ sbt
Getting Scala 2.9.1 (for sbt)...
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.9.1/scala-compiler-2.9.1.jar ...
        [SUCCESSFUL ] org.scala-lang#scala-compiler;2.9.1!scala-compiler.jar (2108ms)
downloading http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.9.1/scala-library-2.9.1.jar ...
^C

I'd like it to use the current version specified in $SCALA_HOME. Anyone know how to get it to do that?

Current env settings:

$SCALA_HOME='/usr/local/typesafe-stack/bin/'
$PATH='...:/usr/local/typesafe-stack/bin:...'
Was it helpful?

Solution

If you are using xsbt 0.11, you can specify the local scala using

scalaHome := Some(file("/path/to/scala"))

You will want to put this into the global settings in your home directory at

~/.sbt/global.sbt

If you are using sbt 0.7 then go here

OTHER TIPS

I am currently run Windows 7 and XP on my machine. And I have not the "home" in windows. I have installed Scala 2.9 and SBT on that. But I have the same problem. The SBT can not recognize the scala.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top