我一直在尝试开始使用 Java Card。我在此链接下载并安装了存储库:https ://github.com/martinpaljak/AppletPlayground/希望开始开发和使用小程序,但到目前为止我还没有成功与卡或读卡器交互方法。跑步
"java -jar lib/openkms-globalplatform.jar -info"
在命令行不返回任何内容 - 根据 GlobalPLatform 站点https://github.com/martinpaljak/GlobalPlatform,它应该返回有关卡的信息。在命令行上运行“pcsctest”会产生
"Testing SCardEstablishContext : Service not available." or
"Testing SCardEstablishContext : Command successful.
Testing SCardGetStatusChange (and then doesn't do anything until I control Z)"
取决于我插入阅读器后的时间。如果我在pcsctest
返回“服务不可用”时运行任何命令,我会收到错误消息
java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: PC/SC, provider: JNA2PCSC, class: jnasmartcardio.Smartcardio$JnaTerminalFactorySpi)....
Caused by: java.lang.IllegalStateException: jnasmartcardio.Smartcardio$JnaPCSCException: SCardEstablishContext got response 0x8010001d (SCARD_E_NO_SERVICE: The Smart card resource manager is not running.).
我正在使用 OS X。我尝试了几种不同的工具来与 Java Cards 交互,但没有一个可以工作。如果有人能告诉我我可能做错了什么或建议一种更好的与 Java Cards 交互的方法,我将非常感激。