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

[feature request] #309

Open
chenjia123 opened this issue Jul 10, 2022 · 1 comment
Open

[feature request] #309

chenjia123 opened this issue Jul 10, 2022 · 1 comment

Comments

@chenjia123
Copy link

Why not support search for different locations by platform? Just like JNA.

Snipaste_2022-07-10_21-10-26

Now I implement similar functionality with the following code:

Platform nativePlatform = Platform.getNativePlatform();
Platform.OS os = nativePlatform.getOS();
Platform.CPU cpu = nativePlatform.getCPU();
String searchPath = String.format(basePath + "/src/main/resources/%s-%s", os, cpu);
XXX obj =  LibraryLoader.create(XXX.class).search(searchPath).load("some_so");

But use JNA:

XXX obj = Native.load("some_so", XXX.class);
@jowilkes
Copy link

I don't get it - Why would this functionality go into the library, when the library search path is a standard part of the runtime environment?

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

No branches or pull requests

2 participants