JNI Hello World Unsatisfied Link Error

后端 未结 5 1206
抹茶落季
抹茶落季 2020-11-30 13:58

This is my first attempt at JNI. My ultimate goal is to get all tasks currently running on a machine, but need to get even a simple example running. I keep getting this erro

5条回答
  •  萌比男神i
    2020-11-30 14:37

    I believe that you should be using

    System.loadLibrary("HelloWorld");
    

    instead of System.load. LoadLibrary will check your system path (not the Java library path) so make sure that HelloWorld.dll is in a directory where it can found. Also note that it does not require the full path, and you don't need to add the dll extension to the end.

提交回复
热议问题