UnsatisfiedLinkError with native library under sbt

前端 未结 1 1653
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-07 05:25

I\'m using sbt 0.13 and have issues using the leveldbjni native library under sbt (even after issue #358 has been resolved). A similar issue has already been reported for which

相关标签:
1条回答
  • 2021-02-07 06:03

    Any ideas why there's an UnsatisfiedLinkError only under sbt?

    As @juereth commented:

    Sbt is using magic classloaders to try to prevent "leaks" of native loaded libraries, and allow you to re-import the library multiple times. Sbt will actually rename the DLL/SO/jnilib and load it in a special classloader. I'm not positive if this is only a plugin feature, or something for all apps.

    So this is somewhat expected behavior with the current design of sbt. If forking works, then that's what you have to do.

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