diff options
author | Jacek <jacek.poreda@sonarsource.com> | 2021-06-17 13:53:05 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-06-17 20:03:08 +0000 |
commit | 4d8578acc6a8618558e92b58ad19287f94200c2f (patch) | |
tree | eaa53b05ad098f7e6bd03bcdda1bd1eeb6383a15 /server/sonar-main/src/main/java | |
parent | 80f1f7218e195751a765507f018a13b98f953d50 (diff) | |
download | sonarqube-4d8578acc6a8618558e92b58ad19287f94200c2f.tar.gz sonarqube-4d8578acc6a8618558e92b58ad19287f94200c2f.zip |
SONAR-14960 Fix Elasticsearch deprecation warning for JAVA_HOME
Diffstat (limited to 'server/sonar-main/src/main/java')
-rw-r--r-- | server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java b/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java index b51d2a69e6f..5b89acf18ce 100644 --- a/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java +++ b/server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java @@ -109,7 +109,7 @@ public class CommandFactoryImpl implements CommandFactory { .setEsInstallation(esInstallation) .setEnvVariable("ES_PATH_CONF", esInstallation.getConfDirectory().getAbsolutePath()) .setEnvVariable("ES_JVM_OPTIONS", esInstallation.getJvmOptions().getAbsolutePath()) - .setEnvVariable("JAVA_HOME", System.getProperties().getProperty("java.home")) + .setEnvVariable("ES_JAVA_HOME", System.getProperties().getProperty("java.home")) .suppressEnvVariable(ENV_VAR_JAVA_TOOL_OPTIONS) .suppressEnvVariable(ENV_VAR_ES_JAVA_OPTS); } @@ -124,7 +124,7 @@ public class CommandFactoryImpl implements CommandFactory { .add("-Des.path.home=" + esInstallation.getHomeDirectory().getAbsolutePath()) .add("-Des.path.conf=" + esInstallation.getConfDirectory().getAbsolutePath())) .setEnvVariable("ES_JVM_OPTIONS", esInstallation.getJvmOptions().getAbsolutePath()) - .setEnvVariable("JAVA_HOME", System.getProperties().getProperty("java.home")) + .setEnvVariable("ES_JAVA_HOME", System.getProperties().getProperty("java.home")) .setClassName("org.elasticsearch.bootstrap.Elasticsearch") .addClasspath("lib/*") .suppressEnvVariable(ENV_VAR_JAVA_TOOL_OPTIONS) |