Skip to content

Commit 6dbc6a4

Browse files
committed
Load libraries from /usr/lib64 as well
Like on Fedora
1 parent c46a100 commit 6dbc6a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/purejava/appindicator/AppIndicator.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class AppIndicator extends _AppIndicator {
4848

4949
allPath.add("/usr/lib"); // for systems, that don't implement multiarch
5050
allPath.add("/app/lib"); // for flatpak and libraries in the flatpak sandbox
51+
allPath.add("/usr/lib64"); // for Fedora-like distributions
5152
for (String path : allPath) {
5253
try {
5354
if (!path.equals("/app/lib")) {
@@ -61,7 +62,10 @@ public class AppIndicator extends _AppIndicator {
6162
} catch (UnsatisfiedLinkError ignored) { }
6263
}
6364

64-
// When loading via System.load wasn't successful, try to load via System.loadLibrary
65+
// When loading via System.load wasn't successful, try to load via System.loadLibrary.
66+
// System.loadLibrary builds the libname by prepending the prefix JNI_LIB_PREFIX
67+
// and appending the suffix JNI_LIB_SUFFIX. This usually does not work for library files
68+
// with an ending like '3.so.1'.
6569
if (!isLoaded) {
6670
try {
6771
System.loadLibrary(LIBNAME_WITH_VERSION);

0 commit comments

Comments
 (0)