Skip to content

Commit 224a4e5

Browse files
committed
Load libraries from /usr/lib64 as well
Like on Fedora
1 parent 24c3454 commit 224a4e5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public final class AppIndicator {
4545

4646
allPath.add("/usr/lib"); // for systems, that don't implement multiarch
4747
allPath.add("/app/lib"); // for flatpak and libraries in the flatpak sandbox
48+
allPath.add("/usr/lib64"); // for Fedora-like distributions
4849
for (String path : allPath) {
4950
try {
5051
System.load(path + File.separator + AYATANA_APPINDICATOR_VERSION);
@@ -66,7 +67,10 @@ public final class AppIndicator {
6667
}
6768
}
6869

69-
// When loading via System.load wasn't successful, try to load via System.loadLibrary
70+
// When loading via System.load wasn't successful, try to load via System.loadLibrary.
71+
// System.loadLibrary builds the libname by prepending the prefix JNI_LIB_PREFIX
72+
// and appending the suffix JNI_LIB_SUFFIX. This usually does not work for library files
73+
// with an ending like '3.so.1'.
7074
if (!isLoaded) {
7175
try {
7276
System.loadLibrary(AYATANA_APPINDICATOR_LIBNAME_VERSION);

0 commit comments

Comments
 (0)