小编Aud*_*udy的帖子

Java POS 打印机错误

我是 Java 新手,我正在使用 Java 开发 POS 应用程序。

我为这个项目买了一台 Epson POS 打印机。打印机型号是EPSON TM-U220.

我已经安装了JavaPos,我的代码片段如下。但是在运行时出现此错误。

感谢有人可以帮助我解决这个问题。


run:
jpos.JposException: Service does not exist in loaded JCL registry
StarReceiptTest finished.
    at jpos.loader.simple.SimpleServiceManager.createConnection(SimpleServiceManager.java:179)
    at jpos.loader.JposServiceLoader.findService(JposServiceLoader.java:154)
    at jpos.BaseJposControl.open(BaseJposControl.java:481)
    at StarReceiptTest.main(StarReceiptTest.java:54)
BUILD SUCCESSFUL (total time: 1 second)
Run Code Online (Sandbox Code Playgroud)
import jpos.JposConst;
import jpos.JposException;
import jpos.POSPrinter;
import jpos.POSPrinterConst;

import jpos.util.JposPropertiesConst;

public class StarReceiptTest
{
    public static void main(String[] args){   
        /*
        If you want to place the jpos.xml file elsewhere on your local file system then uncomment the …
Run Code Online (Sandbox Code Playgroud)

java javapos

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

java ×1

javapos ×1