diff --git a/docs/documentation/index.html b/docs/documentation/index.html
index 7ee0bb10..295b00eb 100644
--- a/docs/documentation/index.html
+++ b/docs/documentation/index.html
@@ -513,14 +513,14 @@
<path_to_jre>/bin/client/jvm.dll
macOS
- The Java Runtime Library (called libjli.dylib) can be found inside of your JRE install folder. Run the following command in your terminal to find the location of your default Java installation:
+ The Java Runtime Library (called libjli.dylib) can be found inside of your JDK install folder. Run the following command in your terminal to find the location of your default Java installation:
/usr/libexec/java_home
This should give you a path looking like this:
/Library/Java/JavaVirtualMachines/<jdk_version>/Contents/Home
The "libjli.dylib" should be available at:
- /Library/Java/JavaVirtualMachines/<jdk_version>/Contents/Home/jre/lib/jli/libjvm.dylib
+ /Library/Java/JavaVirtualMachines/<jdk_version>/Contents/MacOS/libjli.dylib
Insert the full path to libjli.dylib into the Java Path setting in the Preferences Window.
diff --git a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp
index 81798bf0..ce02c9f6 100644
--- a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp
+++ b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.cpp
@@ -358,7 +358,7 @@ void QtProjectWizardContentPreferences::populate(QGridLayout* layout, int& row)
m_javaPath->setFileFilter(
QStringLiteral("JLI or JVM Library (libjli.dylib libjvm.dylib)"));
m_javaPath->setPlaceholderText(
- QStringLiteral("/Contents/Home/jre/lib/jli/libjli.dylib"));
+ QStringLiteral("/Library/Java/JavaVirtualMachines//Contents/MacOS/libjli.dylib"));
break;
case OS_LINUX:
m_javaPath->setFileFilter(QStringLiteral("JVM Library (libjvm.so)"));
diff --git a/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorMac.cpp b/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorMac.cpp
index 55ef520a..eb6b4e46 100644
--- a/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorMac.cpp
+++ b/src/lib_gui/utility/path_detector/java_runtime/JavaPathDetectorMac.cpp
@@ -18,6 +18,16 @@ std::vector JavaPathDetectorMac::doGetPaths() const
std::string output = utility::executeProcess(command.c_str()).second;
if (!output.empty())
+ {
+ javaPath = FilePath(utility::trim(output) + "/../MacOS/libjli.dylib").makeCanonical();
+ }
+
+ if (!javaPath.exists() && output.size())
+ {
+ javaPath = FilePath(utility::trim(output) + "/lib/libjli.dylib");
+ }
+
+ if (!javaPath.exists() && output.size())
{
javaPath = FilePath(utility::trim(output) + "/jre/lib/jli/libjli.dylib");
}