mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Warnings.
This commit is contained in:
parent
39d0e4e464
commit
5d9263eda9
2 changed files with 4 additions and 4 deletions
|
@ -3,11 +3,11 @@ package com.beust.kobalt
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
abstract class JavaInfo {
|
abstract class JavaInfo {
|
||||||
var javaExecutable: File? = null
|
val javaExecutable: File?
|
||||||
get() = findExecutable("java")
|
get() = findExecutable("java")
|
||||||
var javacExecutable: File? = null
|
val javacExecutable: File?
|
||||||
get() = findExecutable("javac")
|
get() = findExecutable("javac")
|
||||||
var javadocExecutable: File? = null
|
val javadocExecutable: File?
|
||||||
get() = findExecutable("javadoc")
|
get() = findExecutable("javadoc")
|
||||||
abstract var javaHome: File?
|
abstract var javaHome: File?
|
||||||
abstract var runtimeJar: File?
|
abstract var runtimeJar: File?
|
||||||
|
|
|
@ -97,7 +97,7 @@ open class Jvm constructor(
|
||||||
if (javaHome != null) {
|
if (javaHome != null) {
|
||||||
val jdkHome = if (javaHome!!.endsWith("jre")) javaHome!!.parentFile else javaHome
|
val jdkHome = if (javaHome!!.endsWith("jre")) javaHome!!.parentFile else javaHome
|
||||||
val exec = File(jdkHome, "bin/" + command)
|
val exec = File(jdkHome, "bin/" + command)
|
||||||
var executable = File(os.getExecutableName(exec.absolutePath))
|
val executable = File(os.getExecutableName(exec.absolutePath))
|
||||||
if (executable.isFile) {
|
if (executable.isFile) {
|
||||||
return executable
|
return executable
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue