UnsatisifiedLinkError - Any idea on how to fix this?

为君一笑 提交于 2019-12-10 15:29:34

问题


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

I get this error when I run from the command line, however, it does not cause any issues with my program running on my machine, however, on other peoples machines the program will not run at all.

I have never come across this error before and fairly confused.. mostly that it runs fine on my machine, but not on others even though it throws this error on both.


回答1:


This is a classpath error. Its likely that you have it set up right for compile time but not runtime. Make sure that either your jar is in the right location and/or that you've set your classpath to include the jar.




回答2:


Go to the Jintellitype website, download the source, add it to your download folder and then move the .dll files into the folder with the Jitellitype classes after building the project



来源:https://stackoverflow.com/questions/10368114/unsatisifiedlinkerror-any-idea-on-how-to-fix-this

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!