4
votes

This exception is arising when I am running my program for smart card reading. My device is not connected. Please help me.

2
Maybe it's because the device is not connected? - m0skit0
May be you are correct. I will try after device connection. - JDGuide

2 Answers

18
votes

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.
0
votes

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());