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

Native part loading and missing library #12

Closed
andyrozman opened this issue Jan 16, 2015 · 7 comments
Closed

Native part loading and missing library #12

andyrozman opened this issue Jan 16, 2015 · 7 comments
Milestone

Comments

@andyrozman
Copy link

You need to add class for loading native parts from jar... Project nrjavaserial uses something similar and it work great...
Library for linux x64 is missing at least one version of it, you need to create linux-amd64 directory and copy from linux-x86-64 (leave that one here).

@gary-rowe
Copy link
Owner

Thanks for the update. If you're able to offer up a pull request containing these changes it'll help speed things up (I'm maxed out on other work at the moment).

@andyrozman
Copy link
Author

I am sorry... my git knowledge is almost non-existant... I can send you link to correct file.. here it is...
https://github.com/NeuronRobotics/nrjavaserial/blob/master/nrjavaserial/src/main/java/gnu/io/NativeResource.java

You will probably need to modify it a little...

@gary-rowe
Copy link
Owner

No worries, thanks for the link.

@gary-rowe gary-rowe added this to the Release 0.3.0 milestone Jan 16, 2015
@gary-rowe gary-rowe added awaiting review This code is awaiting the original creator of the issue to review the solution and provide feedback and removed awaiting review This code is awaiting the original creator of the issue to review the solution and provide feedback labels Jan 29, 2015
gary-rowe added a commit that referenced this issue Jan 29, 2015
@gary-rowe
Copy link
Owner

I'm not sure of the purpose of the native library loading since JNA already provides this with Native. Can you provide more detail?

In the meantime I've added the Linux support for AMD64.

@gary-rowe gary-rowe added the awaiting review This code is awaiting the original creator of the issue to review the solution and provide feedback label Jan 29, 2015
@andyrozman
Copy link
Author

It's simply for loading native library from jar file... so that you don't need to worry if user has correct file installed. When app is started and library loaded, correct native part will be loaded from jar and you can run with it...
In most cases where you have native libraries included they are deployed as external files (.dll, .so etc), with this class you can load native libraries from jar file and not from java binary folder

@gary-rowe
Copy link
Owner

Is that still within scope of hid4java? If I understand you correctly it should be the case that JNA will load the correct hidapi library from the JAR through Native as seen in HidApiLibrary.

This mechanism would also be available for any other libraries a user may wish to load since JNA would be available on the downstream application's classpath and thus any other binaries they supplied should be accessible.

Can you give me a use case where this is necessary?

@gary-rowe
Copy link
Owner

In order to progress the 0.3.0 release I'll close this issue and if it's still required then a new issue covering it specifically can be raised.

@gary-rowe gary-rowe removed the awaiting review This code is awaiting the original creator of the issue to review the solution and provide feedback label Jan 31, 2015
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