private def findJvmInstallation()

in project/CurrentEnvironment.scala [47:62]


  private def findJvmInstallation(javaVersion: String): Option[File] = {
    val jvmFolder = PossibleJvmLocations
      .flatMap { folder =>
        val dirs = Option(folder.listFiles()).getOrElse(Array.empty).filter(_.isDirectory)
        dirs.filter(_.getName.contains(javaVersion))
      }
      .headOption
      .map { root =>
        if (OsName.contains("mac"))
          root / "/Contents/Home"
        else
          root
      }

    jvmFolder.filter(_.exists())
  }