From: Daniel Schwarz Date: Thu, 10 Aug 2017 10:01:54 +0000 (+0200) Subject: SONAR-8798 use SonarQube's current JVM to launch Elasticsearch X-Git-Tag: 6.6-RC1~668 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6bf6ac5279bb26b044e85c2190e13f3014383b4f;p=sonarqube.git SONAR-8798 use SonarQube's current JVM to launch Elasticsearch --- diff --git a/server/sonar-process-monitor/src/main/java/org/sonar/application/process/CommandFactoryImpl.java b/server/sonar-process-monitor/src/main/java/org/sonar/application/process/CommandFactoryImpl.java index 1214518fb54..2a2bffde8a9 100644 --- a/server/sonar-process-monitor/src/main/java/org/sonar/application/process/CommandFactoryImpl.java +++ b/server/sonar-process-monitor/src/main/java/org/sonar/application/process/CommandFactoryImpl.java @@ -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));