# getScalaVersion

@Nullable
open fun getScalaVersion(scalaJar: File): String(source)

Determines the version of a Scala Jar file (scala-compiler, scala-library, scala-jdbc, etc.). If the version cannot be determined, or the file is not a Scala Jar file, `null` is returned.

Implementation note: The version is determined by parsing the file name, which is expected to match the pattern 'scala-[component]-[version].jar'.

#### Return

the version of the Scala Jar file

#### Parameters

scalaJar

a Scala Jar file