- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
get the scala version at runtime
Sat, 2010-09-04, 18:16
In java I can call System.getProperty("java.vm.version") to get the java version, is there a similar way to get the version of the scala library that would be in the classpath?
thx
Sun, 2010-09-05, 05:37
#2
Re: get the scala version at runtime
Thanks Erik, that's exactly what I was looking for. I guess I should have looked at the api a little longer, it seems obvious now. :-)
Mike
On Sep 4, 2010, at 1:23 PM, Erik Engbrecht wrote:
Mike
On Sep 4, 2010, at 1:23 PM, Erik Engbrecht wrote:
Welcome to Scala version 2.8.0.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_20).Type in expressions to have them evaluated.Type :help for more information.
scala> scala.util.Properties.versionString res0: java.lang.String = version 2.8.0.final
scala> scala.util.Properties.versionMsgres1: String = Scala library version 2.8.0.final -- Copyright 2002-2010, LAMP/EPFL
scala> scala.util.Properties.scalaPropOrElse("version.number", "unknown") res2: String = 2.8.0.final
scala>
On Sat, Sep 4, 2010 at 1:17 PM, Michael Fortin <mikee@m410.us> wrote:In java I can call System.getProperty("java.vm.version") to get the java version, is there a similar way to get the version of the scala library that would be in the classpath?
thx
--
http://erikengbrecht.blogspot.com/
scala> scala.util.Properties.versionString res0: java.lang.String = version 2.8.0.final
scala> scala.util.Properties.versionMsgres1: String = Scala library version 2.8.0.final -- Copyright 2002-2010, LAMP/EPFL
scala> scala.util.Properties.scalaPropOrElse("version.number", "unknown") res2: String = 2.8.0.final
scala>
On Sat, Sep 4, 2010 at 1:17 PM, Michael Fortin <mikee@m410.us> wrote:
--
http://erikengbrecht.blogspot.com/