Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to interact with a smart card in Java?

Is there is a library (API) in Java with which I can interact with a smart card? Similar to the WinSCard library.

I need to be able to connect with the smart card and read data from it. I need to implement it in Java so that I can use it under any OS (Linux, Mac, Windows). Since, the WinSCard library only works under Windows because it uses a DLL (WinSCard.dll).

Is there anything as good as WinSCard in Java?

like image 400
Q8Y Avatar asked Sep 29 '10 15:09

Q8Y


3 Answers

One of the solutions is to use Java™ Smart Card I/O API. See the "Description" section for a simple usage example.

like image 110
jmones Avatar answered Sep 25 '22 23:09

jmones


The basic API is the Smartcard IO, which offer basic operation to send APDU to the card. After this, there is several higher API available. For instance, if you need to connect to a JavaCard to manage applet, you need a Global Platform implementation, for instance the Opal Library (Shameless Self-promotion).

like image 34
Kartoch Avatar answered Sep 25 '22 23:09

Kartoch


PC/SC specification as a reader and a satandard interface between card and computer.Open the VC support PC/SC standard key header file WinScard.h. With java can call the PC/SC of VC.As a middle way to solve you problems.

like image 43
user4935264 Avatar answered Sep 23 '22 23:09

user4935264