Java - Loading dlls by a relative path and hide them inside a jar

前端 未结 4 845
遇见更好的自我
遇见更好的自我 2020-11-28 11:05

PART 1

I am developing a Java application that should be release as a jar. This program depends on C++ external libraries called by JNI. To load them, I use the me

4条回答
  •  眼角桃花
    2020-11-28 11:55

    Basically this should work. As this is the way JNA does it, simply download it and study the code. YOu even have some hints to make this platform independent...

    EDIT

    JNA brings its native code along in the jar, unpacks the correct binary at runtime und loads it. This may be a good pattern to follow (if i got your question correct).

提交回复
热议问题