Windows 中 Epson POS 打印机的 JPOS 配置问题 [英] JPOS Configuration Problems for an Epson POS printer in Windows

查看:43
本文介绍了Windows 中 Epson POS 打印机的 JPOS 配置问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Windows 中使用 jPOS 进行打印,但出现以下异常:

I'm trying to print using jPOS in Windows and get the following exception:

jpos.JposException: Could not connect to service with logicalName = Printer: Exception.message=jp.co.epson.uposcommon.util.EpsonJposServiceInstanceFactory
    at jpos.loader.simple.SimpleServiceConnection.connect(Unknown Source)
    at jpos.BaseJposControl.open(Unknown Source)
...

更多信息:

我正在尝试将我们的 Java 打印软件从 Linux(它运行良好)移植到 Windows.我们使用的是 Epson TM-T70 收据打印机.例如,我安装了常规打印机驱动程序,并立即能够使用记事本打印内容.

I'm trying to port our Java printing software from Linux (where it works well) to Windows. We are using an Epson TM-T70 receipt printer. I installed the regular printer drivers and was immediately able to print stuff using notepad, for instance.

现在我安装了 Epson JavaPoS ADK.我使用 ADK 附带的 SetupPOS 应用程序配置了打印机.我为我的打印机创建了一个新配置,逻辑设备名称为打印机".我保存了所有内容并创建了 jpos.xml 文件.

Now I installed the Epson JavaPoS ADK. I configured the printer using the SetupPOS application that comes with the ADK. I created a new configuration for my printer with Logical Device Name "Printer". I saved everything and it created the jpos.xml file.

当我尝试运行我们的应用程序并执行 printer.open("Printer") 其中Printer"是逻辑设备名称而打印机是 POSPrinter 实例时,我得到了上述异常.

When I try run our application and it executes printer.open("Printer") where "Printer" is the logical device name and printer is a POSPrinter instance, I get the exception above.

我知道我生成的 jpos.xml 文件正在被使用,因为如果我提供一个随机的逻辑设备名称,我会得到一个不同的异常.

I know that my generated jpos.xml file is being used because if I provide a random logical device name, I get a different exception.

我猜问题出在SetupPOS的端口配置上.打印机通过 USB 连接.我尝试了出现在 Windows 打印机属性 (ESDPRT001) 中的端口名称,我什至尝试了 COM1 到 COM10 的所有组合,但没有任何效果.

I guess the problem is in the port configuration of SetupPOS. The printer is connected through USB. I tried the Port name that appears in the windows printer properties (ESDPRT001) and I even tried all combiniations of COM1 to COM10 but nothing works.

有人有什么建议吗?谢谢!

Does anyone have some suggestion? Thanks!

推荐答案

爱普生 JavaPOS ADK 的安装程序是……嗯……让我说:非常特别".所以Installation会在JRE的ext/lib目录下复制一些jar文件(如epsonupos.jar、jposXXX.jar等)(!!!)(安装JavaPOS时必须选择)司机).如果我们安装另一个 JavaPOS 版本,切换到另一个 JRE/JDK,使用不是来自 Epson 或其他东西的其他打印机,我们也会产生一些非常奇怪的效果.

The Installation Routine of the Epson JavaPOS ADK is ... ahm ... let me say: "very special". So the Installation copies some jar files (like epsonupos.jar, jposXXX.jar and some more) in the ext/lib Directory of the JRE (!!!) (which must be selected while installing the JavaPOS Driver). We had also some very strange effects if we install another JavaPOS Version, switching to another JRE/JDK, using other Printers which are not from Epson or somthing else.

您的问题可能是由于不同 jar 版本或 JDK 或其他内容之间的任何冲突造成的...

May be your problem is a result of any conflicts between different jar Version or JDK's or somthing else ...

自 ADK 版本 1.11.anywhat(不太确定,但我的意思是 1.11.9)以来,您可以指定存储其他 jar 文件的路径.但是:某些 DLL 也将在当前最新的 ADK 版本 (1.13.17) 中存储到所选 JRE 的 bin 目录中.可能这也是不同版本的使用过的 jar 和使用过的 DLL 或其他东西之间的冲突......

Since ADK Version 1.11.anywhat (not realy sure, but I mean 1.11.9) you can specify the path in which the additional jar files are stored. But: Some DLL's will be also in the currently newest ADK Version (1.13.17) stored into the bin directory of the selected JRE. May be this is also a conflict between different Versions of used jar's and used DLLs or something else ...

这篇关于Windows 中 Epson POS 打印机的 JPOS 配置问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆