Skip to content

Commit

Permalink
Merge pull request #2635 from Izder456/develop
Browse files Browse the repository at this point in the history
 FIX launcher/java/JavaUtils.cpp to properly autodetect JVM paths on …
  • Loading branch information
Trial97 authored Jul 13, 2024
2 parents 5f345ce + 0a543cb commit 2df5d40
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions launcher/java/JavaUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ QList<QString> JavaUtils::FindJavaPaths()
return javas;
}

#elif defined(Q_OS_LINUX)
#elif defined(Q_OS_LINUX) || defined(Q_OS_OPENBSD) || defined(Q_OS_FREEBSD)
QList<QString> JavaUtils::FindJavaPaths()
{
QList<QString> javas;
Expand All @@ -419,6 +419,7 @@ QList<QString> JavaUtils::FindJavaPaths()
scanJavaDir(snap + dirPath);
}
};
#if defined(Q_OS_LINUX)
// oracle RPMs
scanJavaDirs("/usr/java");
// general locations used by distro packaging
Expand All @@ -437,7 +438,10 @@ QList<QString> JavaUtils::FindJavaPaths()
scanJavaDirs("/opt/ibm"); // IBM Semeru Certified Edition
// flatpak
scanJavaDirs("/app/jdk");

#elif defined(Q_OS_OPENBSD) || defined(Q_OS_FREEBSD)
// ports install to /usr/local on OpenBSD & FreeBSD
scanJavaDirs("/usr/local");
#endif
auto home = qEnvironmentVariable("HOME");

// javas downloaded by IntelliJ
Expand Down

0 comments on commit 2df5d40

Please sign in to comment.