简体   繁体   English

如何编写jPOS服务

[英]How to write jPOS service

I have a PoS device which is created by me. 我有一个由我创建的PoS设备。 Now I want to connect my device to PoS computer. 现在,我想将设备连接到PoS计算机。 For that as I have to write my own jPOS service. 为此,我必须编写自己的jPOS服务。
I searched for a sample or tutorial for days, but I couldn't find any. 我搜索了几天的示例或教程,但找不到任何内容。
How can I achieve this? 我该如何实现?

  1. Download jpos114.jar . 下载jpos114.jar
  2. Add this jar file into your project and create a new class to implement the service. 将此jar文件添加到您的项目中,并创建一个新类来实现该服务。 For example: public class MyLineDisplay implements LineDisplay114 and implement the functions you will use. 例如: public class MyLineDisplay implements LineDisplay114并实现您将使用的功能。
  3. Export the service to be a jar file for developing JavaPOS application or you can just use Postest/Postest2 to test device service. 将服务导出为用于开发JavaPOS应用程序的jar文件,或者您可以仅使用Postest / Postest2来测试设备服务。
  4. Create a jpos.xml file to write down the information of your device service for device control to connect to the device service. 创建一个jpos.xml文件来记下设备服务的信息,以便设备控制连接到设备服务。 Postest/Postest2 also include jpos.xml and you can refer to it. Postest / Postest2还包含jpos.xml,您可以参考它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM