【问题标题】:UnsatisifiedLinkError - Any idea on how to fix this?UnsatisfiedLinkError - 关于如何解决这个问题的任何想法?
【发布时间】:2012-04-28 22:28:20
【问题描述】:
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: com.melloware.jintellitype.JIntellitypeException: Could not load JIntellitype.dll from local file system or from inside JAR
    at com.melloware.jintellitype.JIntellitype.<init>(JIntellitype.java:114)
    at com.melloware.jintellitype.JIntellitype.getInstance(JIntellitype.java:174)
    at CaptureScreen.registerHotkeys(CaptureScreen.java:163)
    at CaptureScreen.<init>(CaptureScreen.java:100)
    at CaptureScreen.main(CaptureScreen.java:199)
    ... 5 more
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\B\AppData\Local\Temp: Can't find    dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.load0(Unknown Source)
    at java.lang.System.load(Unknown Source)
    at com.melloware.jintellitype.JIntellitype.<init>(JIntellitype.java:99)
    ... 9 more

我从命令行运行时收到此错误,但是,它不会导致我的程序在我的机器上运行时出现任何问题,但是,在其他人的机器上,该程序根本不会运行。

我以前从未遇到过这个错误并且相当困惑..主要是它在我的机器上运行良好,但在其他机器上却没有,即使它在两者上都抛出了这个错误。

【问题讨论】:

  • JIntellitype 库使用JNI 调用JIntellitype.dll 中的本机代码,但找不到DLL。看起来 DLL 存储为 jarfile 资源,程序尝试在运行时将其解压缩到 temp 目录以从那里加载它,但出现问题并且该文件实际上并不存在。

标签: java unsatisfiedlinkerror


【解决方案1】:

这是一个类路径错误。您可能已将其设置为编译时而不是运行时。确保您的 jar 位于正确的位置和/或您已将类路径设置为包含该 jar。

【讨论】:

    【解决方案2】:

    访问 Jintellitype 网站,下载源代码,将其添加到您的下载文件夹中,然后在构建项目后将 .dll 文件移动到包含 Jitellitype 类的文件夹中

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-21
      • 2011-03-20
      • 1970-01-01
      • 1970-01-01
      • 2021-10-09
      • 2011-05-18
      相关资源
      最近更新 更多