How do I get the Scala version from within Scala itself?

前端 未结 4 429
面向向阳花
面向向阳花 2021-01-31 13:18

This is not about command-line compiler options. How do I programmatically obtain the Scala version inside code?

Alternatively, where does the Eclipse Scala plugin v2 st

4条回答
  •  星月不相逢
    2021-01-31 13:40

    You can get the Scala version like this:

    scala> scala.tools.nsc.Properties.versionString
    res7: java.lang.String = version 2.9.0.final
    

    I don't know the specifics of the plugin, though.

提交回复
热议问题