Loading DLL in Java - Eclipse - JNI

后端 未结 9 440
北荒
北荒 2020-12-17 18:19

I am trying to load a dll in java using the following code System.loadLibrary(\"mydll\");

The project is placed in D:\\development\\project\\ and i have placed t

9条回答
  •  醉梦人生
    2020-12-17 18:38

    One problem you have is: System.load("D:\mydll.dll"); should be System.load("D:\\mydll.dll"); or System.load("D:/mydll.dll");

    I have had more success with System.load, but loadlibrary is better designed for multiplatform. It figures out the extension for you.

提交回复
热议问题