java.lang.UnsatisfiedLinkError: Unable to load library 'xxx': Native library (win32-x86-64/ID_Fpr.dll)
使用 JNA 调用 dll 库,因为 dll 库是32 位的,而 jvm 是 64位的,所以发生的错误:
java.lang.UnsatisfiedLinkError: Unable to load library 'xxx': Native library (win32-x86-64/ID_Fpr.dll)
,必须使用 32 位的 Jvm 才行。
参见 http://stackoverflow.com/questions/14286647/trying-to-use-dll-from-java-jna-unable-to-load-library-exception
I had exactly the same problem with loading a DLL, I solved it in this way:
- As Christian Kuetbach said, check if the simpleDLL you are using is compatible with your processor's architecture, a 32-bit DLL won't work on a 64-bit machine, and also a 64-bit DLL won't work on a 32-bit machine.
If the DLL is compatible, then the problem may be in your java library path. I put my DLL into the
user.dirdirectory and then I used this code:Set Java library path to
user.diror maybe another path you want:String myLibraryPath = System.getProperty("user.dir");//or another absolute or relative path System.setProperty("java.library.path", myLibraryPath);Load the library:
System.loadLibrary("libraryWithoutDLLExtension");
It worked for me, try it and tell me if it works for you.
Please check if the simpleDLL is 32 or 64 bit. Then check, if the JVM is also 32 or 64 bit. They have to be for the same platform.
You may also specify an absolute path, if you change loadLibrary() to load():http://www.chilkatsoft.com/p/p_499.asp
===================
java.lang.UnsatisfiedLinkError: Unable to load library 'ID_Fpr': Native library (win32-x86/ID_Fpr.dll)
表示 dll 库找不到,而不是 32 位 和 64位的冲突。
java.lang.UnsatisfiedLinkError: Unable to load library 'xxx': Native library (win32-x86-64/ID_Fpr.dll)的更多相关文章
- 开发错误记录13:java.lang.UnsatisfiedLinkError: Couldn't load xxx.so: findLibrary returned null
今天在导入环信开发包时,编译报如下错: java.lang.UnsatisfiedLinkError: Couldn't load hyphenate_av from loader dalvik.sy ...
- ubuntu 12.04 x86_64:java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons
sy@sy-Aspire-:~$ .0_155965261/configuration/.log !SESSION -- ::39.595 ------------------------------ ...
- Android中运行的错误:java.lang.UnsatisfiedLinkError: Couldn't load locSDK3: findLibrary returned null.
---恢复内容开始--- 明明已经加入了liblocSDK3.so,但总是无法定位.提示错误java.lang.UnsatisfiedLinkError: Couldn't load locSDK3: ...
- java.lang.UnsatisfiedLinkError: Couldn't load hyphenate_av from loader dalvik.system.PathClassLoader
android studio引入第三方库时报如下异常. 06-15 16:50:24.477 9497-9497/easemobim.test.com.easemobim E/AndroidRunti ...
- java.lang.UnsatisfiedLinkError: Couldn't load vi_voslib from loader dalvik.system.PathClassLoader
加载手机视频查看的JAR包时 运行提示 java.lang.UnsatisfiedLinkError: Couldn't load vi_voslib from loader dalvik.syste ...
- android 高德地图API 之 java.lang.UnsatisfiedLinkError: Couldn't load amapv3: findLibrary returned null错误
错误场景: 运行android app时,在运行到调用高德地图API时,出现 “java.lang.UnsatisfiedLinkError: Couldn't load amapv3: findLi ...
- Android中执行的错误:java.lang.UnsatisfiedLinkError: Couldn't load locSDK3: findLibrary returned null.
今天在使用百度地图的时候执行发现报错: 明明已经增加了liblocSDK3.so.但总是无法定位.提示错误java.lang.UnsatisfiedLinkError: Couldn't load l ...
- 用idea+maven编译打包spark project core错误:java.lang.RuntimeException: Unable to load a Suite class
Discovery starting. *** RUN ABORTED *** java.lang.RuntimeException: Unable to load a Suite class tha ...
- Caused by: java.lang.UnsatisfiedLinkError: Couldn't load 。。。。
最近需要做个有地图搜索功能的模块,用到百度地图SDK,但是从官网上下载SDK后导入工程,修改apiKey后,还是无法运行,总是抱这个错误:Caused by: java.lang.Unsatisfie ...
随机推荐
- line-height 属性
p.small {line-height:90%} p.big {line-height:200%} 该属性会影响行框的布局.在应用到一个块级元素时,它定义了该元素中基线之间的最小距离而不是最 ...
- Java并发编程:Timer和TimerTask(转载)
Java并发编程:Timer和TimerTask(转载) 下面内容转载自: http://blog.csdn.net/xieyuooo/article/details/8607220 其实就Timer ...
- @RequestMapping映射请求
1.SpringMVC使用@RequestMapping注解为控制器指定可以处理哪些URL请求. 2.在控制器的类定义和方法定义处都可标注@RequestMapping 2.1 类定义处:提 ...
- contentResolver
今天练习一个联系人的增,写,改,查的几项操作,其中一个重要的知识点 ContentResolver 还有一篇不错的参考文献 主要参见下面这个链接 http://cthhqu.blog.51cto. ...
- 【thinkphp5】【THINKCMG】标签部分开发(一)
最近打算开一个自己的CMS后台轮子,框架选择了thinkphp 5 (别问我为什么选择这个框架)然后想边开发边记录一下,方便自己方便他人 进入正题 1.数据库设计 一共三张表 post文章表这个就不贴 ...
- Maven搭建SpringMVC+Mybatis项目详解
前言 最近比较闲,复习搭建一下项目,这次主要使用spring+SpringMVC+Mybatis.项目持久层使用Mybatis3,控制层使用SpringMVC4.1,使用Spring4.1管理控制器, ...
- CGI与Servlet的比较
转自:http://www.maxhis.info/java/cgi-vs-servlet/ 谢! 概括来说,CGI和Servlet可以完成相同的功能. 一:CGI(Common Gateway In ...
- Python WMI获取Windows系统信息 监控系统
#!/usr/bin/env python # -*- coding: utf-8 -*- #http://www.cnblogs.com/liu-ke/ import wmi import os i ...
- Atitit.atiRI 与 远程调用的理论and 设计
Atitit.atiRI 与 远程调用的理论and 设计 1. 怎么做到透明化远程服务调用?1 2. 2 怎么对消息进行编码和解码1 2.1. 确定消息数据结构dsl1 2.1.1. 消息里为什 ...
- wpf框架模型分析
一.MVVM模式介绍: 在网上看过很多的MVVM中各块的介绍,感觉很混乱.找到如下的描述感觉很合理,也很好理解(https://msdn.microsoft.com/en-us/library/gg4 ...