mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
win launcher: updated create JVM error message.
IDEA-189436 IDEA fails to launch with JDK 10 set as IDEA_JDK_64.
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -651,6 +651,16 @@ void SetProcessDPIAwareProperty()
|
||||
}
|
||||
}
|
||||
|
||||
std::string getErrorMessage(int errorCode)
|
||||
{
|
||||
std::string errorMessage = "";
|
||||
if (errorCode == -6)
|
||||
{
|
||||
errorMessage = "MaxJavaStackTraceDepth=-1 is outside the allowed range [ 0 ... 1073741823 ].\nImproperly specified VM option 'MaxJavaStackTraceDepth=-1'\n";
|
||||
}
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
bool CreateJVM()
|
||||
{
|
||||
JavaVMInitArgs initArgs;
|
||||
@@ -671,10 +681,15 @@ bool CreateJVM()
|
||||
if (result != JNI_OK)
|
||||
{
|
||||
std::stringstream buf;
|
||||
std::string jvmError = getErrorMessage(result);
|
||||
if (jvmError == "") {
|
||||
jvmError = "If you already have a " BITS_STR " JDK installed, define a JAVA_HOME variable in \n";
|
||||
jvmError += "Computer > System Properties > System Settings > Environment Variables.\n";
|
||||
}
|
||||
|
||||
buf << "Failed to create JVM: error code " << result << ".\n";
|
||||
buf << "JVM Path: " << jvmPath << "\n";
|
||||
buf << "Most likely the cause of the problem is incorrect settings in the VM options file.";
|
||||
buf << jvmError;
|
||||
buf << "\nFailed to create JVM. ";
|
||||
buf << "JVM Path: " << jvmPath;
|
||||
std::string error = LoadStdString(IDS_ERROR_LAUNCHING_APP);
|
||||
MessageBoxA(NULL, buf.str().c_str(), error.c_str(), MB_OK);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user