English 中文(简体)
系统.loadLibrary () 提供 java. lang. UnsfafiedLinkerError: 不能装入库
原标题:System.loadLibrary() gives java.lang.UnsatisfiedLinkerError: Can t load library
  • 时间:2012-05-22 20:47:40
  •  标签:
  • java
  • dll

I m having an issue with loading a simple .dll through java s System.loadLibrary("name.dll"); I have one copy of the dll in C:libraries ame.dll as well as another copy in the system32 folder. Note that C:libraries is NOT in my path environment variable. For some reason, when I call System.loadLibrary("name.dll"), I am getting:

java.lang.UnsatisfiedLinkError: Can t load library: C:libraries
ame.dll
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1706)
    at java.lang.Runtime.load0(Runtime.java:770)
    at java.lang.System.load(System.java:1003)

即使在我从 C: libraries 移除了名字. dll 之后, 我仍然会收到同样的错误 。 系统. load 在一个不在路径中的地方找到. dll 是否有任何理由? 为什么即使在文件被删除之后它仍然在那个地方寻找?

最佳回答

您需要更改 - Djava. library. path 指向系统32, 而不是 C: 图书馆。

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签