ERJAN
ERJAN

Reputation: 24500

can't check scala version in sbt:bin after installing sbt

i installed scala using sbt. I have adoptOpenjdk java 8 distribution.

when i navigate to scala/bin folder and launch scala.bat file - i have this:

C:\scala\bin>sbt.bat
[warn] Neither build.sbt nor a 'project' directory in the current directory: "C:\scala\bin"
c) continue
q) quit
?c
[warn] No sbt.version set in project/build.properties, base directory: C:\scala\bin
[info] welcome to sbt 1.3.13 (AdoptOpenJDK Java 1.8.0_252)
[info] set current project to bin (in build file:/C:/scala/bin/)
[info] sbt server started at local:sbt-server-238ff4d6ac394d9cc1de

when trying to check scala version using

"scala -version;" or "scala-version;" i get this error:

sbt:bin> scala -version;
[error] Expected ';'
[error] scala -version
[error]               ^
sbt:bin>

what's wrong? how do i see what scala version i m running?

Upvotes: 0

Views: 297

Answers (1)

Levi Ramsey
Levi Ramsey

Reputation: 20551

Because the particular version of Scala to use with SBT is set per-project, the scala version in use is set by the scalaVersion property (usually set in build.sbt). It can be inspected with

show scalaVersion

at an sbt prompt.

Upvotes: 4

Related Questions