开发者社区 问答 正文

Java 读取USB扫描枪?报错

@杨尚川 你好,想跟你请教个问题:您好,我想请问下,就是说怎么我把那个读取USB扫描枪的代码,运行在tomcat下就报错啊!

错误如下:

严重: Exception sending context initialized event to listener instance of class barcode.ScanBarcodeListener
java.lang.NoClassDefFoundError: com/sun/jna/win32/W32APIOptions

展开
收起
爱吃鱼的程序员 2020-06-22 20:40:48 639 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    <spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">缺少包含com/sun/jna/win32/W32APIOptions的类库。我比较奇怪的是,读取USB扫描枪的应用是准备部署在tomcat上吗? 可是,那个项目在MyEclipse上运行就是在tomcat中运行啊,不然的话要怎么做呢可是怎么读取<atarget="_blank"rel="nofollow"><spanstyle="color:#333333;">USB扫描枪的代码啊?

    2020-06-22 20:41:04
    赞同 展开评论