1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 16:07:12 -07:00

Better JAVA_HOME detection.

This commit is contained in:
Cedric Beust 2017-04-19 08:19:46 -07:00
parent 3686c4e110
commit 1febd47368

View file

@ -2,8 +2,10 @@ package com.beust.kobalt
class SystemProperties {
companion object {
val javaBase = System.getProperty("java.home") ?:
(System.getenv("JAVA_HOME") ?: throw IllegalArgumentException("JAVA_HOME not defined"))
val javaBase =
System.getenv("JAVA_HOME")
?: System.getProperty("java.home")
?: throw IllegalArgumentException("JAVA_HOME not defined")
val javaVersion = System.getProperty("java.version")
val homeDir = System.getProperty("user.home")
val tmpDir = System.getProperty("java.io.tmpdir")