We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4aa28b2 commit 1bb5d4eCopy full SHA for 1bb5d4e
platformlauncher.cpp
@@ -218,9 +218,9 @@ bool PlatformLauncher::checkJDKHome() {
218
219
if (jdkhome.empty()) {
220
logMsg("-Xjdkhome is not set, checking for %%JAVA_HOME%%...");
221
- char *javaHome = getenv("JAVA_HOME");
222
- if (javaHome) {
223
- javaHome = trimTrailingBackslashes(javaHome);
+ char *origJavaHome = getenv("JAVA_HOME");
+ if (origJavaHome) {
+ const char *javaHome = trimTrailingBackslashes(origJavaHome).c_str();
224
logMsg("%%JAVA_HOME%% is set: %s", javaHome);
225
if (!jvmLauncher.initialize(javaHome)) {
226
logMsg("ERROR: Cannot locate java installation, specified by JAVA_HOME: %s", javaHome);
0 commit comments