Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to System.loadLibrary(...) #37

Merged
merged 6 commits into from
Sep 27, 2023

Conversation

overheadhunter
Copy link
Member

Use System.loadLibrary("fuse3"); on Linux instead of Debian-specific System.load("/lib/x86_64-linux-gnu/libfuse3.so.3"), respecting java.library.path.

Similarly, try loading fuse or fuse-t on macOS.

This is still just a fallback. The primary attempt still depends on builder.setLibraryPath(...), which is intended to be used by downstream projects, similar as in this example:

var libPath = System.getProperty("fuse.lib.path");
if (libPath != null && !libPath.isEmpty()) {
builder.setLibraryPath(libPath);
}

when `fuse.lib.path` is not set explicitly, allowing to use Java's default lib lookup mechanism based on `java.library.path` on Linux + macOS
to check whether loading `.so` or `.dylib` from `java.library.path` works, when not calling `FuseBuilder.setLibraryPath(...)`
@overheadhunter overheadhunter merged commit 92a9200 into develop Sep 27, 2023
7 checks passed
@overheadhunter overheadhunter deleted the feature/fallback-to-java.library.path branch September 27, 2023 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants