From 790a7d3eb6dad068140a80b30f7f75a4cc8b77e7 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Tue, 13 Oct 2015 18:55:33 -0700 Subject: [PATCH] Syntax. --- src/main/kotlin/com/beust/kobalt/Jvm.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/Jvm.kt b/src/main/kotlin/com/beust/kobalt/Jvm.kt index bce3582d..e7cd1fe7 100644 --- a/src/main/kotlin/com/beust/kobalt/Jvm.kt +++ b/src/main/kotlin/com/beust/kobalt/Jvm.kt @@ -7,7 +7,7 @@ import java.io.File import java.io.IOException public open class Jvm constructor( - val os: com.beust.kobalt.OperatingSystem, + val os: OperatingSystem, var javaBase: File? = null) : JavaInfo() { private var _javaHome: File? = null @@ -67,7 +67,7 @@ public open class Jvm constructor( if (toolsJar.exists()) { return toolsJar } - if (javaHome!!.getName().equals("jre", true)) { + if (javaHome!!.name.equals("jre", true)) { javaHome = javaHome!!.parentFile toolsJar = File(javaHome, "lib/tools.jar") if (toolsJar.exists()) { @@ -78,8 +78,8 @@ public open class Jvm constructor( if (os.isWindows()) { val version = SystemProperties.Companion.javaVersion if (javaHome!!.name.toRegex().matches("jre\\d+") - || javaHome!!.getName() == "jre${version}") { - javaHome = File(javaHome!!.parentFile, "jdk${version}") + || javaHome!!.name == "jre$version") { + javaHome = File(javaHome!!.parentFile, "jdk$version") toolsJar = File(javaHome, "lib/tools.jar") if (toolsJar.exists()) { return toolsJar