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 ...
随机推荐
- 【Java每日一题】20161102
package Nov2016; public class Ques1102 implements Parent{ @Override public void method() { } } inter ...
- 【Java每日一题】20161019
20161018问题解析请点击今日问题下方的"[Java每日一题]20161019"查看 package Oct2016; import java.util.List; publi ...
- 2016暑假多校联合---Rikka with Sequence (线段树)
2016暑假多校联合---Rikka with Sequence (线段树) Problem Description As we know, Rikka is poor at math. Yuta i ...
- Java--简单的Spring AOP配置以及AOP事物管理,JDK/GCLib动态代理
一.看一下简单的通过XML的AOP配置 1.首先创建一个简单的Student类 public class Student { private Integer age; private String n ...
- InfluxDB学习之InfluxDB的HTTP API写入操作
HTTP API也有两种操作:写入和查询,本文就先给大家介绍一下 InfluxDB的HTTP API的写入操作方式. 在InfluxDB学习的上一篇文章:InfluxDB学习之InfluxDB ...
- Tomcat中JVM内存溢出及合理配置
Tomcat本身不能直接在计算机上运行,需要依赖于硬件基础之上的操作系统和一个Java虚拟机.Tomcat的内存溢出本质就是JVM内存溢出,所以在本文开始时,应该先对Java JVM有关内存方面的知识 ...
- ASP.NET 多语言的实现(后台消息+前台消息+页面自动绑定)
一 前言 界面支持多种语言,在使用ASP.NET自带的多语言方案时遇到下列问题: 在做管理类的功能时,有添加.修改和查看页面,需要支持多语言的控件基本相同,但要维护多处,产生冗余(ASP.NET有共享 ...
- Select-or-Die演示11种美化下拉框select方法
在线预览 下载地址 在线实例 <div class="main"> <div class="mianc"> <h1>默认&l ...
- 原生JS:String对象详解
@import url(http://i.cnblogs.com/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/c ...
- 关于JS堆栈与拷贝
1.栈(stack)和堆(heap) stack为自动分配的内存空间,它由系统自动释放:而heap则是动态分配的内存,大小不定也不会自动释放. 2.基本类型和引用类型 基本类型:存放在栈内存中的简单数 ...