簡體   English   中英

Epson Java Pos ADK異常:它未初始化

[英]Epson Java Pos ADK Exception: It is not initialized

現在我嘗試編寫一個使用Epson Java Pos ADK的Java應用程序。

我做了什么:-Installed Java 1.6.0_22 -Installed Java JDK -Installed Eclipse - 安裝了Epson Java Pos ADK 1.11.8

然后我用Com Port Tool嘗試了我的打印機,我發給他十六進制字符,看看是否一切正常。 它確實!

然后我開始開發我的應用程序。 jpos.xml我使用了Epson Java Pos ADK Package中的SetupPOS生成器。

我使用了幾行來從我的應用程序中進行測試打印:

posPrinter = new POSPrinter();
posPrinter.open("##THE_NAME_I_SET_IN_JPOS_XML##");      
posPrinter.claim(0);
posPrinter.setDeviceEnabled(true);
posPrinter.printNormal(station, "xxxxxxxxxxxxxxxxxx\n");
posPrinter.cutPaper(0);
posPrinter.release();
posPrinter.setDeviceEnabled(false);
posPrinter.close();

但這個應用程序的結果是:

jpos.JposException:它未初始化。 在jp.co.epson.un.Pntr.ComnPrinterService.sendOutputData的jp.co.epson.upos.pntr.CommonPrinterService.sendOutputData(未知來源)的jp.co.epson.upos.pntr.CommonPrinterService.checkInitialized(未知來源) (未知來源)jp.co.epson.upos.pntr.CommonPrinterService.executeNormalPrint(未知來源),位於jpos.POSPrinter.printNormal(未知來源)的jp.co.epson.upos.pntr.CommonPrinterService.printNormal(未知來源)在Main.main的Printer(Printer.java:146)(Main.java:28)

我在兩台不同的PC(Vista和XP 32bit)上試用了相同的版本和工具,但它總是一樣的。

我還嘗試了JavaPos示例測試應用程序和EpsonHealtCheckTool。 這個工具也是一樣的。

不知道還有什么可以嘗試,大家都知道這個問題嗎?

PS:我的打印機Epson TM-U220A,串口連接似乎有效,因為當我嘗試聲明打印機而另一個應用程序使用COM端口時,我的應用程序說端口不可用。

謝謝。

我發現了最新的問題:我使用了錯誤的電纜。

我自己制作,請參閱下面的Epson文檔:

用於Epson POS打印機的零調制解調器電纜

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM