/** * Retrieves a specific environment property if it exists, <code>null</code> otherwise. * * @param name the name of the property to find * * @return the environment value */ @Nullable public String getEnvironmentVariable(@NotNull String name) { if (this.procEnv == null) { return null; } SystemInfo systemInfo = SystemInfoFactory.createJavaSystemInfo(); boolean isWindows = systemInfo.getOperatingSystemType() == OperatingSystemType.WINDOWS; // Windows env names are case insensitive, so convert the specified name to all-caps before doing the lookup. return getEnvironmentVariables().get((isWindows) ? name.toUpperCase() : name); }
/** * Retrieves a specific environment property if it exists, <code>null</code> otherwise. * * @param name the name of the property to find * * @return the environment value */ @Nullable public String getEnvironmentVariable(@NotNull String name) { if (this.procEnv == null) { return null; } SystemInfo systemInfo = SystemInfoFactory.createJavaSystemInfo(); boolean isWindows = systemInfo.getOperatingSystemType() == OperatingSystemType.WINDOWS; // Windows env names are case insensitive, so convert the specified name to all-caps before doing the lookup. return getEnvironmentVariables().get((isWindows) ? name.toUpperCase() : name); }
Map<String, String> processEnvVars; if (getStartScript(serverParentProcess) != null) { processEnvVars = serverParentProcess.getEnvironmentVariables(); } else { processEnvVars = serverProcess.getEnvironmentVariables();