From 9ad9826d0865b4598ebd2231a8c05001912e6376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 16 Nov 2014 12:56:33 +0100 Subject: [PATCH] GH-608 Re-detect java when the binary goes missing --- gui/MainWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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)