]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8798 use SonarQube's current JVM to launch Elasticsearch
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>
Thu, 10 Aug 2017 10:01:54 +0000 (12:01 +0200)
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>
Thu, 10 Aug 2017 12:28:12 +0000 (14:28 +0200)
server/sonar-process-monitor/src/main/java/org/sonar/application/process/CommandFactoryImpl.java

index 1214518fb54009ef103a1c089f817f92d3429a78..2a2bffde8a9cfa7cecf76bf9a88a698e3cb941a4 100644 (file)
@@ -80,7 +80,7 @@ public class CommandFactoryImpl implements CommandFactory {
       .addJvmOption(settings.getProps().nonNullValue(ProcessProperties.SEARCH_JAVA_ADDITIONAL_OPTS))
       .setJvmOptionsFile(jvmOptionsFile)
       .setEnvVariable("ES_JVM_OPTIONS", jvmOptionsFile.toString())
-      ;
+      .setEnvVariable("JAVA_HOME", System.getProperties().getProperty("java.home"));
 
     settingsMap.forEach((key, value) -> res.addEsOption("-E" + key + "=" + value));