Windows 64-bit launcher looks for bundled jre in both jre and jre64 folders

(cherry picked from commit 758810a)
This commit is contained in:
Anton Makeev
2014-09-04 08:47:27 +02:00
parent fbbef502ed
commit d14cfcea26
3 changed files with 10 additions and 5 deletions
Binary file not shown.
Binary file not shown.
+10 -5
View File
@@ -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())
{