GH-608 Re-detect java when the binary goes missing

This commit is contained in:
Petr Mrázek 2014-11-16 12:56:33 +01:00
parent 6a09fd2898
commit 9ad9826d08

View File

@ -1491,6 +1491,16 @@ void MainWindow::checkSetDefaultJava()
askForJava = true; askForJava = true;
break; break;
} }
if(!currentJavaPath.contains('/'))
{
currentJavaPath = QStandardPaths::findExecutable(currentJavaPath);
}
QFile currentJavaBin(currentJavaPath);
if(!currentJavaBin.exists())
{
askForJava = true;
break;
}
#if defined Q_OS_WIN32 #if defined Q_OS_WIN32
QString currentHack = MMC->settings()->get("JavaDetectionHack").toString(); QString currentHack = MMC->settings()->get("JavaDetectionHack").toString();
if (currentHack != javaHack) if (currentHack != javaHack)