Skip to content

Commit 8ddc2e5

Browse files
committed
Load libraries from /usr/lib64 as well
Like on Fedora
1 parent c0da9eb commit 8ddc2e5

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
@@ -46,6 +46,7 @@ public class AppIndicator extends _AppIndicator {
4646
}
4747

4848
allPath.add("/usr/lib"); // for systems, that don't implement multiarch
49+
allPath.add("/usr/lib64"); // for Fedora-like distributions
4950
for (String path : allPath) {
5051
try {
5152
System.load(path + File.separator + LIB_NAME_VERSION);
@@ -54,7 +55,10 @@ public class AppIndicator extends _AppIndicator {
5455
} catch (UnsatisfiedLinkError ignored) { }
5556
}
5657

57-
// When loading via System.load wasn't successful, try to load via System.loadLibrary
58+
// When loading via System.load wasn't successful, try to load via System.loadLibrary.
59+
// System.loadLibrary builds the libname by prepending the prefix JNI_LIB_PREFIX
60+
// and appending the suffix JNI_LIB_SUFFIX. This usually does not work for library files
61+
// with an ending like '3.so.1'.
5862
if (!isLoaded) {
5963
try {
6064
System.loadLibrary(LIBNAME_WITH_VERSION);

0 commit comments

Comments
 (0)