Trying to use DLL from Java (JNA). Unable to load library exception

后端 未结 5 2140
囚心锁ツ
囚心锁ツ 2020-11-30 14:13

I have NetBeans project from tutorial which causes exception:

Exception in thread \"main\" java.lang.UnsatisfiedLinkError: Unable to load library \'s

5条回答
  •  难免孤独
    2020-11-30 14:38

    I could only run in 32bit (Xp).

    Place the DLL in the folder "c:\Windows\System32"

    helloWorldDLL lib = (helloWorldDLL) Native.loadLibrary("helloworldDLL", helloWorldDLL.class);

    If the error java.lang.UnsatisfiedLinkError: Unable to load library" persists, use Dependency Walker to view the dependent DLLs.

    Dependency Walker

提交回复
热议问题