I am working on an Java application which uses smartcardio
to work with smartcard.
It must be possible to have one removing its USB card reader and then inserting it again without starting again the applet.
I am using the terminals()
and waitForChange()
methods to detect terminal changes and it is working fine on Linux, MacOS and Win7.
But on Windows 8 (and Windows 8 only), after the removal of the last terminal, these methods throw a SCARD_E_NO_SERVICE
CardException
, and don't detect any more changes.
I'm not sure what "Service" is it talking about. But I think this is launched in my thread when I call TerminalFactory.getDefault()
to have a TerminalFactory
singleton. And I think this singleton may have a way to manage the underlayed service and this is what is broken.
Has anyone any lead on how to manage terminal disconnection with smartcardio
on Windows 8 ?