mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Syntax.
This commit is contained in:
parent
ca7b1e4f7a
commit
790a7d3eb6
1 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ import java.io.File
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
public open class Jvm constructor(
|
public open class Jvm constructor(
|
||||||
val os: com.beust.kobalt.OperatingSystem,
|
val os: OperatingSystem,
|
||||||
var javaBase: File? = null) : JavaInfo() {
|
var javaBase: File? = null) : JavaInfo() {
|
||||||
|
|
||||||
private var _javaHome: File? = null
|
private var _javaHome: File? = null
|
||||||
|
@ -67,7 +67,7 @@ public open class Jvm constructor(
|
||||||
if (toolsJar.exists()) {
|
if (toolsJar.exists()) {
|
||||||
return toolsJar
|
return toolsJar
|
||||||
}
|
}
|
||||||
if (javaHome!!.getName().equals("jre", true)) {
|
if (javaHome!!.name.equals("jre", true)) {
|
||||||
javaHome = javaHome!!.parentFile
|
javaHome = javaHome!!.parentFile
|
||||||
toolsJar = File(javaHome, "lib/tools.jar")
|
toolsJar = File(javaHome, "lib/tools.jar")
|
||||||
if (toolsJar.exists()) {
|
if (toolsJar.exists()) {
|
||||||
|
@ -78,8 +78,8 @@ public open class Jvm constructor(
|
||||||
if (os.isWindows()) {
|
if (os.isWindows()) {
|
||||||
val version = SystemProperties.Companion.javaVersion
|
val version = SystemProperties.Companion.javaVersion
|
||||||
if (javaHome!!.name.toRegex().matches("jre\\d+")
|
if (javaHome!!.name.toRegex().matches("jre\\d+")
|
||||||
|| javaHome!!.getName() == "jre${version}") {
|
|| javaHome!!.name == "jre$version") {
|
||||||
javaHome = File(javaHome!!.parentFile, "jdk${version}")
|
javaHome = File(javaHome!!.parentFile, "jdk$version")
|
||||||
toolsJar = File(javaHome, "lib/tools.jar")
|
toolsJar = File(javaHome, "lib/tools.jar")
|
||||||
if (toolsJar.exists()) {
|
if (toolsJar.exists()) {
|
||||||
return toolsJar
|
return toolsJar
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue