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

Open
wants to merge 2 commits into
base: master
Choose a base branch
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.

src/com/sun/jna/Platform.java Outdated Show resolved Hide resolved
@@ -352,4 +356,30 @@ static String getNativeLibraryResourcePrefix(int osType, String arch, String nam
}
return osPrefix;
}

public static String getMultiArchPath() {
Copy link
Member

Choose a reason for hiding this comment

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

I don't see why this was moved into public visibility. I can see why people might want this, but this is not a fix, but a feature.

Copy link
Author

Choose a reason for hiding this comment

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

This is quite handy to have this available.

src/com/sun/jna/Native.java Outdated Show resolved Hide resolved
@niol
Copy link
Author

niol commented Jul 29, 2023

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

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.

None yet

2 participants