gpt4 book ai didi

java - 使用 Epson JavaPOS ADK 1.11.18.0 时遇到问题

转载 作者:搜寻专家 更新时间:2023-11-01 03:26:26 24 4
gpt4 key购买 nike

我最近买了一台 Epson TM-T20 打印机,我目前正在尝试构建一个将利用它的 Java 应用程序。我安装了打印机附带的 JavaPOS,并将其相关的 .jar 文件添加到我的构建路径中。综上所述,我在尝试运行随它打包的一些示例示例时不断收到此错误。

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jp_co_epson_upos_firm_FirmNativeAccess_1_11_0001 in java.library.path

如果跟踪堆栈的其余部分有帮助

at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at jp.co.epson.upos.core.v1_11_0001.pntr.CommonPrinterService.(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at jp.co.epson.uposcommon.creator.EpsonJposServiceInstanceFactory.createInstance(Unknown Source) at jpos.loader.simple.SimpleServiceConnection.connect(Unknown Source) at jpos.BaseJposControl.open(Unknown Source) at Step1Frame.processWindowEvent(Step1Frame.java:79) at java.awt.Window.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

其他信息

  • 操作系统:W7 x64
  • IDE:Eclipse Juno 服务版本 1 x64
  • 安装最新的 JDK
  • JavaPOS 有一个名为setupPOS 的应用程序。我还在此设置中添加了我的打印机

如有任何帮助,我们将不胜感激。谢谢

最佳答案

根据java documentation UnsatisfiedLinkError 异常是:

Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.

根据 SO 中的另一个问题,您可以阅读 here问题可能出在您的库路径中。尝试包含选项

-Djava.library.path=./XXX

其中 ./XXX 是打印机驱动程序可能存储的相对路径或完整路径(jp_co_epson_upos_firm_FirmNativeAccess_1_11_0001.dll 或 .so 所在的目录)。

祝你好运!

关于java - 使用 Epson JavaPOS ADK 1.11.18.0 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12814563/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com