Exception in thread “main” java.lang.UnsatisfiedLinkError: jnidispatch (/com/sun /jna/win32-x86/jnidispatch.dll) not found in resource path

前端 未结 2 1375
长情又很酷
长情又很酷 2021-01-22 08:48

I have a small test program which runs perfectly in the JBuilder 6 debugger. When I make a .jar file and run it I get an error

>java -jar testadll.jar
Start o         


        
2条回答
  •  -上瘾入骨i
    2021-01-22 09:00

    You've apparently merged JNA's classes with your own jar file, but omitted its native support. Ensure that all files from the original jna.jar (not just class files) are copied to the new destination and that their original paths are preserved.

    Specifically, your jar file must include com/sun/jna/win32-x86/jnidispatch.dll. If you want to include support for other platforms, you must include com/sun/jna/*/jnidispatch as well.

提交回复
热议问题