bgibson
bgibson

Reputation: 19155

sbt-launch.jar not recognizing scala 2.9.1 already installed

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:...'

Upvotes: 4

Views: 924

Answers (2)

Amir Ehsan
Amir Ehsan

Reputation: 93

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.

Upvotes: 0

Neil Essy
Neil Essy

Reputation: 3607

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

Upvotes: 7

Related Questions