diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-11-16 12:56:33 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-11-16 12:56:33 +0100 |
commit | 9ad9826d0865b4598ebd2231a8c05001912e6376 (patch) | |
tree | f995d9846689f8a1e6fca4ba829eb91a1e26e692 | |
parent | 6a09fd2898fcb76c265e12d5221d332157d8f683 (diff) | |
download | MultiMC-9ad9826d0865b4598ebd2231a8c05001912e6376.tar MultiMC-9ad9826d0865b4598ebd2231a8c05001912e6376.tar.gz MultiMC-9ad9826d0865b4598ebd2231a8c05001912e6376.tar.lz MultiMC-9ad9826d0865b4598ebd2231a8c05001912e6376.tar.xz MultiMC-9ad9826d0865b4598ebd2231a8c05001912e6376.zip |
GH-608 Re-detect java when the binary goes missing
-rw-r--r-- | gui/MainWindow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index ab3ae741..76666560 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -1491,6 +1491,16 @@ void MainWindow::checkSetDefaultJava() askForJava = true; break; } + if(!currentJavaPath.contains('/')) + { + currentJavaPath = QStandardPaths::findExecutable(currentJavaPath); + } + QFile currentJavaBin(currentJavaPath); + if(!currentJavaBin.exists()) + { + askForJava = true; + break; + } #if defined Q_OS_WIN32 QString currentHack = MMC->settings()->get("JavaDetectionHack").toString(); if (currentHack != javaHack) |