mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 07:57:12 -07:00
Merge pull request #461 from ethauvin/master
Fixed finding tools.jar under Windows when JAVA_HOME is set to JRE.
This commit is contained in:
commit
72740079ce
1 changed files with 2 additions and 2 deletions
|
@ -67,7 +67,7 @@ open class Jvm constructor(
|
|||
return toolsJar
|
||||
}
|
||||
if (javaHome!!.name.equals("jre", true)) {
|
||||
javaHome = javaHome!!.parentFile
|
||||
_javaHome = javaHome!!.parentFile
|
||||
toolsJar = File(javaHome, "lib/tools.jar")
|
||||
if (toolsJar.exists()) {
|
||||
return toolsJar
|
||||
|
@ -78,7 +78,7 @@ open class Jvm constructor(
|
|||
val version = SystemProperties.Companion.javaVersion
|
||||
if (javaHome!!.name.toRegex().matches("jre\\d+")
|
||||
|| javaHome!!.name == "jre$version") {
|
||||
javaHome = File(javaHome!!.parentFile, "jdk$version")
|
||||
_javaHome = File(javaHome!!.parentFile, "jdk$version")
|
||||
toolsJar = File(javaHome, "lib/tools.jar")
|
||||
if (toolsJar.exists()) {
|
||||
return toolsJar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue