Improve message when JAVA_HOME not set (#32022)

closes #31399
This commit is contained in:
Alpar Torok 2018-07-21 12:50:17 +00:00 committed by GitHub
parent 1390a849e1
commit 0a511cc76f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -222,7 +222,11 @@ class BuildPlugin implements Plugin<Project> {
// IntelliJ does not set JAVA_HOME, so we use the JDK that Gradle was run with
return Jvm.current().javaHome
} else {
throw new GradleException("JAVA_HOME must be set to build Elasticsearch")
throw new GradleException(
"JAVA_HOME must be set to build Elasticsearch. " +
"Note that if the variable was just set you might have to run `./gradlew --stop` for " +
"it to be picked up. See https://github.com/elastic/elasticsearch/issues/31399 details."
)
}
}
return javaHome