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

前端 未结 2 1376
长情又很酷
长情又很酷 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条回答
  • 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.

    0 讨论(0)
  • 2021-01-22 09:07

    You should use a version of jna.jar, that supports 64 bit, for example jna-4.1.0.jar or jna-3.4.0.jar.

    0 讨论(0)
提交回复
热议问题