summaryrefslogtreecommitdiff
path: root/native
diff options
context:
space:
mode:
Diffstat (limited to 'native')
-rw-r--r--native/MacLauncher/Launcher.m4
-rw-r--r--native/WinLauncher/WinLauncher/WinLauncher.cpp15
2 files changed, 12 insertions, 7 deletions
diff --git a/native/MacLauncher/Launcher.m b/native/MacLauncher/Launcher.m
index 630cf741fdab..7e899f9da040 100644
--- a/native/MacLauncher/Launcher.m
+++ b/native/MacLauncher/Launcher.m
@@ -326,8 +326,8 @@ NSDictionary *parseProperties() {
NSLog(@"Cannot chdir to working directory at %@", cwd);
}
} else {
- NSLog(@"Info.plist is corrupted, Absent WorkingDirectory key.");
- exit(-1);
+ NSString *dir = [[NSFileManager defaultManager] currentDirectoryPath];
+ NSLog(@"WorkingDirectory is absent in Info.plist. Current Directory: %@", dir);
}
}
diff --git a/native/WinLauncher/WinLauncher/WinLauncher.cpp b/native/WinLauncher/WinLauncher/WinLauncher.cpp
index 3249a9a1f0de..681cb46ae6aa 100644
--- a/native/WinLauncher/WinLauncher/WinLauncher.cpp
+++ b/native/WinLauncher/WinLauncher/WinLauncher.cpp
@@ -194,11 +194,16 @@ bool LocateJVM()
return result;
}
- std::string jreDir = GetAdjacentDir(need64BitJRE ? "jre64":"jre");
- if (FindValidJVM(jreDir.c_str()) && Is64BitJRE(jvmPath) == need64BitJRE)
- {
- return true;
- }
+
+ std::vector<std::string> jrePaths;
+ if(need64BitJRE) jrePaths.push_back(GetAdjacentDir("jre64"));
+ jrePaths.push_back(GetAdjacentDir("jre"));
+ for(std::vector<std::string>::iterator it = jrePaths.begin(); it != jrePaths.end(); ++it) {
+ if (FindValidJVM((*it).c_str()) && Is64BitJRE(jvmPath) == need64BitJRE)
+ {
+ return true;
+ }
+ }
if (FindJVMInRegistry())
{