Windows 中 Epson POS 打印机的 JPOS 配置问题

发布于 2024-09-09 16:45:32 字数 879 浏览 10 评论 0原文

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

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 收据打印机。例如,我安装了常规打印机驱动程序,并立即能够使用记事本打印内容。

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

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

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

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

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

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)
...

More information:

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.

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.

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.

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.

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

初与友歌 2024-09-16 16:45:32

Epson JavaPOS ADK 的安装例程是……嗯……让我说:“非常特别”。因此,安装会在 JRE 的 ext/lib 目录中复制一些 jar 文件(如 epsonupos.jar、jposXXX.jar 等)(!!!)(在安装 JavaPOS 时必须选择该目录)司机)。如果我们安装另一个 JavaPOS 版本、切换到另一个 JRE/JDK、使用非 Epson 或其他产品的其他打印机,我们还会产生一些非常奇怪的效果。

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

编辑:

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

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.

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

EDIT:

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 ...

贪了杯 2024-09-16 16:45:32

我解决了这个问题,将以下库路径添加到 java 项目:

C:\Program Files\EPSON\JavaPOS\lib

C:\Program Files\EPSON\JavaPOS\SetupPOS

I Solved this adding the following library paths to java project:

C:\Program Files\EPSON\JavaPOS\lib

C:\Program Files\EPSON\JavaPOS\SetupPOS

天涯沦落人 2024-09-16 16:45:32

使用 javaPOS 1.14.6,在 Debian 9 Linux 上,我使用 LD_LIBRARY_PATH 解决:

$ export LD_LIBRARY_PATH = /opt/EpsonJavaPOS/bin && javapos_application_to_run

在 Windows 10 上复制:

BluetoothIO.DLL
epsonjpos.dll
EthernetIO31.DLL
SerialIO31.dll
USBIO31.DLL

C:\Program Files\EPSON\JavaPOS\bin\

C:\Program Files\ Java\jre1.8.0.171\bin\

运行 javaPOS 应用程序。

With javaPOS 1.14.6, on Debian 9 Linux I solved with LD_LIBRARY_PATH:

$ export LD_LIBRARY_PATH = /opt/EpsonJavaPOS/bin && javapos_application_to_run

On windows 10 copy:

BluetoothIO.DLL
epsonjpos.dll
EthernetIO31.DLL
SerialIO31.dll
USBIO31.DLL

from C:\Program Files\EPSON\JavaPOS\bin\

to C:\Program Files\Java\jre1.8.0.171\bin\

Run javaPOS application.

痴者 2024-09-16 16:45:32

我知道回复有点晚了,但可能会帮助其他有类似问题的人。
就我而言,我正在使用 javapos 与数据逻辑扫描仪交互,并且我收到以下消息:
错误:无法打开 DL-Magellan-9400i-USB-OEM-Scanner-Scale 配置文件,jpos.JposException:无法连接到逻辑名称 = DL-Magellan-9400i-USB-OEM-Scanner-Scale 的服务:
Exception.message=com.dls.jpos.service.DLSScannerInstanceFactory

我开始查看从datalogic下载的javapos软件,发现有一个jar文件未包含在我的类路径中(JavaPOS.jar )这就是我收到错误的原因,看看 netx 图像:

JavaPOS.jar 文件内容

我想分享以防有人遇到同样的问题。
(我花了将近 2 天的时间才完成!!)

I know is a little late for response but may help others with similar problems.
In my case i am interacting with a Data logic Scanner using javapos, and i was having this message:
ERROR: Failed to open DL-Magellan-9400i-USB-OEM-Scanner-Scale profile, jpos.JposException: Could not connect to service with logicalName = DL-Magellan-9400i-USB-OEM-Scanner-Scale:
Exception.message=com.dls.jpos.service.DLSScannerInstanceFactory

i started looking in the javapos software that downloaded from datalogic and found that there was a jar file that was not included in my classpath (JavaPOS.jar) and that was why i was getting the error, take a look netx image:

JavaPOS.jar file content

I wanted to share in case someone has same issues.
(Took me almost 2 days to get it done!!)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文