Is it possible to link a static library to Java through JNI?

后端 未结 4 553
栀梦
栀梦 2021-01-05 07:02

Is it possible to build a HelloWorld.lib and load it to a Java application using JNI? Or it just works with shared libraries?

I couldn\'t find a clear answer on the

4条回答
  •  情话喂你
    2021-01-05 07:43

    To load a library at runtime it must be a dll (windows). If you have a static library (lib) and you have to use it via JNI you have to create a wrapper dll

提交回复
热议问题