Attempt to find jvisualvm

This commit is contained in:
Jan Dalheimer 2014-02-16 12:00:38 +01:00
parent 2e64d0308c
commit c608841f77

View File

@ -39,7 +39,12 @@ void JVisualVM::beginProfilingImpl(MinecraftProcess *process)
void JVisualVMFactory::registerSettings(SettingsObject *settings) 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) BaseExternalTool *JVisualVMFactory::createTool(BaseInstance *instance, QObject *parent)