mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Better JAVA_HOME detection.
This commit is contained in:
parent
3686c4e110
commit
1febd47368
1 changed files with 4 additions and 2 deletions
|
@ -2,8 +2,10 @@ package com.beust.kobalt
|
||||||
|
|
||||||
class SystemProperties {
|
class SystemProperties {
|
||||||
companion object {
|
companion object {
|
||||||
val javaBase = System.getProperty("java.home") ?:
|
val javaBase =
|
||||||
(System.getenv("JAVA_HOME") ?: throw IllegalArgumentException("JAVA_HOME not defined"))
|
System.getenv("JAVA_HOME")
|
||||||
|
?: System.getProperty("java.home")
|
||||||
|
?: throw IllegalArgumentException("JAVA_HOME not defined")
|
||||||
val javaVersion = System.getProperty("java.version")
|
val javaVersion = System.getProperty("java.version")
|
||||||
val homeDir = System.getProperty("user.home")
|
val homeDir = System.getProperty("user.home")
|
||||||
val tmpDir = System.getProperty("java.io.tmpdir")
|
val tmpDir = System.getProperty("java.io.tmpdir")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue