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

后端 未结 4 592
栀梦
栀梦 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:32

    You would have to link it to the JVM, and you don't have a way to do that. That's why JNI is defined with shared libraries, not static ones.

提交回复
热议问题