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

try to load library from /usr/lib/jni if property jna.boot.library.path is not set #1499

Closed
wants to merge 2 commits into from

Conversation

niol
Copy link

@niol niol commented Jan 30, 2023

This patch moves getMultiarchPath() to Platform so that it is available for both Library and NativeLibrary.

It also fixes the library path on the aarch64, armhf and ppc64el platforms.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028374 for more info.

…th is not set

This patch moves getMultiarchPath() to Platform so that it is available for
both Library and NativeLibrary.

It also fixes the library path on the aarch64, armhf and ppc64el platforms.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028374 for more info.
Copy link
Member

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but this needs to be reworked. I see breaking and unnessary changes, please see the inline comments.

@niol
Copy link
Author

niol commented Jul 29, 2023

I finally had time to work on this. Sorry for the long delay.

@niol niol requested a review from matthiasblaesing March 22, 2025 12:54
@matthiasblaesing
Copy link
Member

Sorry, but I don't think this has merrit in its current form. I see why it is tempting, but JNA can do dirty things in private methods, that are only called when they may be called, the same is not true for public methods.

The getMultiArchPath method is not a Platform method. It is also not Linux specific as it is geared towards debian kfreebsd. It is broken on windows and most probably also on mac os/darwin. So while it is tempting to just expose the method it is no solution.

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