From 6bf6ac5279bb26b044e85c2190e13f3014383b4f Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Thu, 10 Aug 2017 12:01:54 +0200 Subject: [PATCH] SONAR-8798 use SonarQube's current JVM to launch Elasticsearch --- .../java/org/sonar/application/process/CommandFactoryImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.39.5