summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/MainWindow.cpp10
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)