redhat 8.3环境中java未检测到智能卡读卡器

hgncfbus  于 2021-06-29  发布在  Java
关注(0)|答案(0)|浏览(360)

我正在使用Redhat8.3和Java1.7
智能卡读卡器acs acr122u和identive cloud 2700 r
java无法检测智能卡读卡器
我的操作系统版本
$>cat /etc/redhat-release Red Hat Enterprise Linux release 8.3 (Ootpa) 附属读卡器
$> lsusb ... Bus 003 Device 003: ID 04e6:5810 SCM Microsystems, Inc. uTrust 2700 R Smart Card Reader Bus 003 Device 004: ID 072f:2200 Advanced Card Systems, Ltd ACR122U 已安装的pcsc驱动程序版本
$>pcscd --version pcsc-lite version 1.8.23. Copyright (C) 1999-2002 by David Corcoran corcoran@musclecard.com. Copyright (C) 2001-2015 by Ludovic Rousseau <ludovic.rousseau@free.fr>. Copyright (C) 2003-2004 by Damien Sauveron sauveron@labri.fr. Report bugs to <pcsclite-muscle@lists.alioth.debian.org>. Enabled features: Linux x86_64-redhat-linux-gnu libsystemd serial usb libudev usbdropdir=/usr/lib64/pcsc/drivers ipcdir=/var/run/pcscd configdir=/etc/reader.conf.d Bus 003 Device 004: ID 072f:2200 Advanced Card Systems, Ltd ACR122U 已启动pcscd服务 $>service pcscd status Redirecting to /bin/systemctl status pcscd.service ● pcscd.service - PC/SC Smart Card Daemon Loaded: loaded (/usr/lib/systemd/system/pcscd.service; indirect; vendor preset: disabled) Active: active (running) since Fri 2021-01-01 15:46:49 +0530; 39min ago Main PID: 5649 (pcscd) Tasks: 6 (limit: 48503) Memory: 1.9M CGroup: /system.slice/pcscd.service └─5649 /usr/sbin/pcscd --foreground --auto-exit Jan 01 15:46:49 localhost.localdomain systemd[1]: Started PC/SC Smart Card Daemon. java版本
$>java -version java version "1.7.0_03" Java(TM) SE Runtime Environment (build 1.7.0_03-b04) Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode) 示例java程序
import java.util.List; import javax.smartcardio.*; public class PCSCTest { public static void main(String[] args) { try { TerminalFactory factory = TerminalFactory.getDefault(); List terminals = factory.terminals().list(); System.out.println("Terminals list size ->"+terminals.size()); //System.out.println(terminals.get(0)); } catch(Exception e) { e.printStackTrace(); } } } 结果是 terminals size-->0

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题