java jna_java使用jna调用

6ca3b100bc1879ee148a855b84686125.png

繁花不似锦

再看了下问题,貌似不是这个原因。可能需要你帖点代码出来才晓得了下面的东西先留着,等找到真正的原因了再来改吧看样子是 DLL 没加载到,JNA 的文档里有设置路径的办法Make your target library available to your Java program. There are several ways to do this:The preferred method is to set the jna.library.path system property to the path to your target library. This property is similar to java.library.path, but only applies to libraries loaded by JNA.Change the appropriate library access environment variable before launching the VM. This is PATH on Windows, LD_LIBRARY_PATH on Linux, and DYLD_LIBRARY_PATH on OSX.Make your native library available on your classpath, under the path {OS}-{ARCH}/{LIBRARY}, where {OS}-{ARCH} is JNA's canonical prefix for native libraries (e.g. win32-x86, linux-amd64, or darwin). If the resource is within a jar file it will be automatically extracted when loaded.大概就是需要你把 DLL 所在目录设置在系统的 PATH 路径里,或者通过 java 的参数 jna.library.path 指定目录,java -Djna.library.path=PATH_TO_YOUR_DLL ClassName

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值