diff options
Diffstat (limited to 'server/sonar-main')
-rw-r--r-- | server/sonar-main/src/main/java/org/sonar/application/command/CommandFactoryImpl.java | 4 | ||||
-rw-r--r-- | server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java | 4 |
2 files changed, 4 insertions, 4 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) diff --git a/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java index ddcf1cad501..ff12bbb68c6 100644 --- a/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java +++ b/server/sonar-main/src/test/java/org/sonar/application/command/CommandFactoryImplTest.java @@ -145,7 +145,7 @@ public class CommandFactoryImplTest { assertThat(esCommand.getEnvVariables()) .contains(entry("ES_PATH_CONF", esConfDir.getAbsolutePath())) .contains(entry("ES_JVM_OPTIONS", new File(esConfDir, "jvm.options").getAbsolutePath())) - .containsKey("JAVA_HOME"); + .containsKey("ES_JAVA_HOME"); assertThat(esCommand.getSuppressedEnvVariables()).containsOnly("JAVA_TOOL_OPTIONS", "ES_JAVA_OPTS"); assertThat(esConfig.getEsJvmOptions().getAll()) @@ -181,7 +181,7 @@ public class CommandFactoryImplTest { assertThat(esCommand.getArguments()).isEmpty(); assertThat(esCommand.getEnvVariables()) .contains(entry("ES_JVM_OPTIONS", new File(esConfDir, "jvm.options").getAbsolutePath())) - .containsKey("JAVA_HOME"); + .containsKey("ES_JAVA_HOME"); assertThat(esCommand.getSuppressedEnvVariables()).containsOnly("JAVA_TOOL_OPTIONS", "ES_JAVA_OPTS"); assertThat(esConfig.getEsJvmOptions().getAll()) |