2012-04-28 160 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

相關問題