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 library naming. #61

Closed
harideva16 opened this issue Sep 7, 2021 · 4 comments
Closed

native library naming. #61

harideva16 opened this issue Sep 7, 2021 · 4 comments

Comments

@harideva16
Copy link

Java native interface (jni) allows calling native libraries

  1. Windows --> .dll,
  2. Linux --> .so and
  3. Mac -->.dylib.

I use the following code to load native library.

  static {
    System.loadLibrary("mypl");
    }

If I generate native library in windows os the native library's name comes mypl.dll

But , in Linux os the native library's name comes libmypl.so and in mac it comes libmypl.dylib

Will this code System.loadLibrary("mypl"); load native library correcty after creating JPackage in linux and mac ?

@pomadchin
Copy link
Member

pomadchin commented Sep 7, 2021

Hey @harideva16, yes System.loadLibrary picks up windows dlls. But how is that connected to SBT-JNI? There is an outsdanding issue that tracks Windows support #20

@harideva16
Copy link
Author

Hey @harideva16, yes System.loadLibrary picks up windows dlls. But how is that connected to SBT-JNI? There is an outsdanding issue that tracks Windows support #20

Can you explain in detail ?

@pomadchin
Copy link
Member

@harideva16 so this is a repo of the SBT JNI plugin; how is your question linked to the project?

@eed3si9n
Copy link
Member

eed3si9n commented Sep 8, 2021

@harideva16 People are using GitHub issues to track bugs and todo list, often volunteering their time to main open source project. If you have general questions about how to use Java, please use Stackoverflow instead.
The entire point of sbt-jni is so you don't need to call System.loadLibrary(...).

@eed3si9n eed3si9n closed this as completed Sep 8, 2021
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

3 participants