Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TerminalFactory cannot find my smartcard terminal



Hi,

I was eagerly awaiting a Java 6 version which supported javax.smartcardio. Now it's here an I can't detect my smartcard terminal. My reader works just fine (for example in java 5 with pkcs11), but I can't use it in Java 6. Following code does not return any terminals:

LOG.debug("default type: " + TerminalFactory.getDefaultType());
TerminalFactory factory = TerminalFactory.getDefault();
LOG.debug("factory type: " + factory.getClass().getName());
CardTerminals cardTerminals = factory.terminals();
LOG.debug("card terminals type: " + cardTerminals.getClass().getName());
Card card;
List<CardTerminal> cardTerminalList = cardTerminals.list();
LOG.debug("# card terminals: " + cardTerminalList.size());
for (CardTerminal cardTerminal : cardTerminalList) {
LOG.debug("card terminal: " + cardTerminal.getName()
+ " card present: " + cardTerminal.isCardPresent());
}
if (cardTerminalList.size() == 0) {
throw new RuntimeException("no smart card terminal found");
}


This code works on Linux so I filed a bug report. It seems that the SunPCSC provider can't be initialized.

If someone has the same problem and finds a work-around ... let me know.

Dieter.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.