summaryrefslogtreecommitdiffstats
path: root/logic/profiler/JVisualVM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/profiler/JVisualVM.cpp')
-rw-r--r--logic/profiler/JVisualVM.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/logic/profiler/JVisualVM.cpp b/logic/profiler/JVisualVM.cpp
index 7b79b2e8..02938028 100644
--- a/logic/profiler/JVisualVM.cpp
+++ b/logic/profiler/JVisualVM.cpp
@@ -39,7 +39,12 @@ void JVisualVM::beginProfilingImpl(MinecraftProcess *process)
void JVisualVMFactory::registerSettings(SettingsObject *settings)
{
- settings->registerSetting("JVisualVMPath");
+ QString defaultValue = QStandardPaths::findExecutable("jvisualvm");
+ if (defaultValue.isNull())
+ {
+ defaultValue = QStandardPaths::findExecutable("visualvm");
+ }
+ settings->registerSetting("JVisualVMPath", defaultValue);
}
BaseExternalTool *JVisualVMFactory::createTool(BaseInstance *instance, QObject *parent)