I wrote the below code to read the attached Smartcard reader on a system. This code work fine for a Windows system but on a Linux the smartcard reader are not detected. The JVM used is Oracle Jre 1.7.0.55, the pcsc_lite is installed and with the command lsusb i see the smartcard reader.
I have also exceuted the code using : java -Dsun.security.smartcardio.library=/usr/lib64/libpcsclite.so.1.0.0 -jar software.jar
But the reader is not detected.
The Code:
int ireader;
TerminalFactory factory = TerminalFactory.getDefault();
List terminals = factory.terminals().list();
ireader = terminals.size();
return ireader;
Any suggestion ?