mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-164519 IntelliJ-based products first installation and launch on Windows: no JVM installation found
RUBY-18390 rubymine64.exe does not find the installed oracle jdk, requiring rubymine64.exe.jdk
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -192,13 +192,22 @@ bool FindJVMInRegistryKey(const char* key, bool wow64_32)
|
||||
|
||||
bool FindJVMInRegistryWithVersion(const char* version, bool wow64_32)
|
||||
{
|
||||
const char* keyName = LoadStdString(IDS_JDK_ONLY) == std::string("true")
|
||||
? "Java Development Kit"
|
||||
: "Java Runtime Environment";
|
||||
|
||||
char* keyName = "Java Runtime Environment";
|
||||
bool foundJava = false;
|
||||
char buf[_MAX_PATH];
|
||||
sprintf_s(buf, "Software\\JavaSoft\\%s\\%s", keyName, version);
|
||||
return FindJVMInRegistryKey(buf, wow64_32);
|
||||
//search jre in registry if the product doesn't require tools.jar
|
||||
if (LoadStdString(IDS_JDK_ONLY) != std::string("true")) {
|
||||
sprintf_s(buf, "Software\\JavaSoft\\%s\\%s", keyName, version);
|
||||
foundJava = FindJVMInRegistryKey(buf, wow64_32);
|
||||
}
|
||||
|
||||
//search jdk in registry if the product requires tools.jar or jre isn't installed.
|
||||
if (!foundJava) {
|
||||
keyName = "Java Development Kit";
|
||||
sprintf_s(buf, "Software\\JavaSoft\\%s\\%s", keyName, version);
|
||||
foundJava = FindJVMInRegistryKey(buf, wow64_32);
|
||||
}
|
||||
return foundJava;
|
||||
}
|
||||
|
||||
bool FindJVMInRegistry()
|
||||
|
||||
Reference in New Issue
Block a user