JavaCPP, UnsatisfiedLinkError when native library is archived in JAR

前端 未结 1 947
一向
一向 2021-01-22 15:54

I\'m trying to call Haskell code from Java, using JavaCPP to help create the necessary JNI binding, as already discussed in this question.

This is how I\'m using it:

相关标签:
1条回答
  • 2021-01-22 16:23

    Building for the native libraries by calling javacpp -jar javacpp.jar com.example.HScode outputs them in com/example/linux-x86_64/ automatically and the Loader loads them from there. So when building the native libraries by some other means, they still need to be moved to com/example/linux-x86_64/, whether inside a JAR file or outside as normal files, if we want the Loader to find them.

    0 讨论(0)
提交回复
热议问题