问题
This exception is arising when I am running my program for smart card reading. My device is not connected. Please help me.
回答1:
This means it could not load a shared library you need. This could be because.
- The library is not in your library path.
- The library does not have the right name e.g. LIBRARY must be libLIBRARY.so on Unix
- The library is not executable by you.
- The library is not for the OS or bit size of your JVM. e.g. a 64-bit JVM will not load a 32-bit library.
- Your JRE is not installed correctly and it is failing to load one of its own libraries.
- You are using a shared library which needs another shared library you don't have.
- The DLL wasn't build as a JNI library or used from JNA.
回答2:
I got this when using System.loadLibrary which will use the java.libary.path resource. Since absolute path isn't allowed by loadLibrary, you can use the absolute path and load method.
System.load(HelloWorld.class.getResource("/dlls/HelloWorld.dll")
.getPath());
来源:https://stackoverflow.com/questions/11825528/exception-in-thread-main-java-lang-unsatisfiedlinkerror