summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
Diffstat (limited to 'logic')
-rw-r--r--logic/launch/steps/CheckJava.cpp3
-rw-r--r--logic/launch/steps/LaunchMinecraft.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/logic/launch/steps/CheckJava.cpp b/logic/launch/steps/CheckJava.cpp
index 9c5fd404..7482624f 100644
--- a/logic/launch/steps/CheckJava.cpp
+++ b/logic/launch/steps/CheckJava.cpp
@@ -15,6 +15,7 @@
#include "CheckJava.h"
#include <launch/LaunchTask.h>
+#include <pathutils.h>
#include <QStandardPaths>
#include <QFileInfo>
@@ -22,7 +23,7 @@ void CheckJava::executeTask()
{
auto instance = m_parent->instance();
auto settings = instance->settings();
- m_javaPath = settings->get("JavaPath").toString();
+ m_javaPath = ResolveExecutable(settings->get("JavaPath").toString());
bool perInstance = settings->get("OverrideJava").toBool() || settings->get("OverrideJavaLocation").toBool();
auto realJavaPath = QStandardPaths::findExecutable(m_javaPath);
diff --git a/logic/launch/steps/LaunchMinecraft.cpp b/logic/launch/steps/LaunchMinecraft.cpp
index 95438003..84abb375 100644
--- a/logic/launch/steps/LaunchMinecraft.cpp
+++ b/logic/launch/steps/LaunchMinecraft.cpp
@@ -16,6 +16,7 @@
#include "LaunchMinecraft.h"
#include <launch/LaunchTask.h>
#include <minecraft/OneSixInstance.h>
+#include <pathutils.h>
#include <QStandardPaths>
LaunchMinecraft::LaunchMinecraft(LaunchTask *parent) : LaunchStep(parent)
@@ -33,7 +34,7 @@ void LaunchMinecraft::executeTask()
QString allArgs = args.join(", ");
emit logLine("Java Arguments:\n[" + m_parent->censorPrivateInfo(allArgs) + "]\n\n", MessageLevel::MultiMC);
- auto javaPath = instance->settings()->get("JavaPath").toString();
+ auto javaPath = ResolveExecutable(instance->settings()->get("JavaPath").toString());
m_process.setProcessEnvironment(instance->createEnvironment());