UnsatisfiedLinkError when using JNI?

前端 未结 2 1399
梦如初夏
梦如初夏 2021-01-12 19:16

I want to call a C program from Java program using JNI in linux ubuntu.

I am new to this and I have tried the sample program given in http://www.ibm.com/developerwor

2条回答
  •  生来不讨喜
    2021-01-12 19:49

    This exception is indicating that the .so is not available to the JVM.

    Adding the directory where the .so exists to the LD_LIBRARY_PATH will resolve this. If the .so depends on other .so libraries the directories where these .so exist will also need added to LD_LIBRARY_PATH.

提交回复
热议问题