Seting Up Smart Card Support

You will need Java 6+ for this lab, either Sun Java or OpenJDK is just fine. Some other Java might work as well, but none except those two mentioned above is tested.

PC/SC driver and middleware should be installed by default on most Linux distros.


Make sure pcsc-lite and libpcsclite1 packages are installed (should be by default), re-install if needed.


Make sure libpcsclite1 package is installed (should be by default), re-install if needed.

You will need a PC/SC Daemon to access the smart card:

  sudo apt-get install pcscd

You will also need to create a symlink to PC/SC library (find out why).

For Debian, run:

  sudo ln -s /usr/lib/ /usr/lib/

For Ubuntu, run:

  sudo ln -s /lib/ /usr/lib/


Option 1: compile and run this tool:

  javac && java CardReaderTest

Option 2: install OpenSC and list available card readers:

  sudo apt-get install opensc
  opensc-tool --list-readers

In either of the cases you should get a list of readers available.

All done. Your Java program can now access smart cards.

Page edit