Kick Buttowski Kick Buttowski - 3 years ago 222
Scala Question

Check Curent Version of Scala inside Dos Command Prompt

Is there any way to find current version of

Scala
that I installed from command prompt?

As you know in command prompt
Java -version
gives us current version of
Java
in the system, and I am wondering if there is any command for
Scala
that gives me its current version.

I follow this instruction to set up
Scala
in Windows



  1. Download the sbt installer from here: http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.msi

  2. Run the installer




Verify that sbt is installed correctly: open the Command Prompt and type
sbt sbt-versio
n, you should see the version number of sbt (the first time you run it, sbt will download libraries from the internet). If you have problems installing sbt, ask for help on the forums.

And the tutorial says, it download dependencies when
sbt sbt-versio
is ran or may be I got that wrong?

Answer Source

Looks like you just need to go to the Windows shell, start SBT and check the Scala version there, e.g.

C:\> sbt

> scala-version

2.9.2 (or whatever)

Now, you have the SBT prompt and can type "console" to open the Scala REPL:

> console

scala> println("Hello")

Hello

You can quit the repl with :q and go back to the SBT prompt

scala> :q

>

Now you can quit SBT using Ctrl+C to go back to the Windows prompt:

C:\>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download