2012-04-28 163 views
4
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 

当我从命令行运行时出现此错误,但是,它不会导致我的程序在我的机器上运行时出现任何问题,但是,在其他人机器上,程序将不会运行。UnsatisifiedLinkError - 有关如何解决此问题的任何想法?

我从来没有遇到过这个错误之前,相当困惑..主要是它在我的机器上运行良好,但不在其他人,即使它在这两个引发此错误。

+2

的JIntellitype库使用JNI调用本地代码后在JIntellitype.dll中,但它找不到该DLL。它看起来像DLL被存储为一个jar文件资源,程序试图在运行时将它解压到临时目录以从那里加载它,但有些是错误的,并且该文件实际上并不存在。 – rob 2012-04-28 23:04:40

回答

1

这是一个类路径错误。它可能是你编译时设置正确,但不是运行时。确保你的jar放在正确的位置和/或你已经设置你的类路径来包含jar。

1

转到Jintellitype网站,下载源代码,将其添加到您的下载文件夹,然后将.dll文件移动到与Jitellitype类的文件夹建设项目

+0

试过这个,仍然没有骰子。 – ShaneIsrael 2012-04-29 00:08:58

相关问题