feat: resolve JARs dynamically
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -16,7 +16,13 @@ JavaChecker::JavaChecker(QObject *parent) : QObject(parent)
|
||||
|
||||
void JavaChecker::performCheck()
|
||||
{
|
||||
QString checkerJar = FS::PathCombine(APPLICATION->getJarsPath(), "JavaCheck.jar");
|
||||
QString checkerJar = JavaUtils::getJavaCheckPath();
|
||||
|
||||
if (checkerJar.isEmpty())
|
||||
{
|
||||
qDebug() << "Java checker library could not be found. Please check your installation.";
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList args;
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "java/JavaUtils.h"
|
||||
#include "java/JavaInstallList.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Application.h"
|
||||
|
||||
#define IBUS "@im=ibus"
|
||||
|
||||
@ -437,3 +438,8 @@ QList<QString> JavaUtils::FindJavaPaths()
|
||||
return addJavasFromEnv(javas);
|
||||
}
|
||||
#endif
|
||||
|
||||
QString JavaUtils::getJavaCheckPath()
|
||||
{
|
||||
return APPLICATION->getJarPath("JavaCheck.jar");
|
||||
}
|
||||
|
@ -39,4 +39,6 @@ public:
|
||||
#ifdef Q_OS_WIN
|
||||
QList<JavaInstallPtr> FindJavaFromRegistryKey(DWORD keyType, QString keyName, QString keyJavaDir, QString subkeySuffix = "");
|
||||
#endif
|
||||
|
||||
static QString getJavaCheckPath();
|
||||
};
|
||||
|
Reference in New Issue
Block a user