简体   繁体   English

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

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

Now I try to write a Java Application what uses the Epson Java Pos ADK. 现在我尝试编写一个使用Epson Java Pos ADK的Java应用程序。

What I did: -Installed Java 1.6.0_22 -Installed Java JDK -Installed Eclipse -Installed the Epson Java Pos ADK 1.11.8 我做了什么:-Installed Java 1.6.0_22 -Installed Java JDK -Installed Eclipse - 安装了Epson Java Pos ADK 1.11.8

Then I tried my Printer using Com Port Tool, I send him Hexadecimal Chars to see if all works. 然后我用Com Port Tool尝试了我的打印机,我发给他十六进制字符,看看是否一切正常。 It does! 它确实!

Then I started developing my Application. 然后我开始开发我的应用程序。 In the jpos.xml I used the SetupPOS generator within the Epson Java Pos ADK Package. jpos.xml我使用了Epson Java Pos ADK Package中的SetupPOS生成器。

I used a few lines to make a test print from my Application: 我使用了几行来从我的应用程序中进行测试打印:

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();

But the result of this app is: 但这个应用程序的结果是:

jpos.JposException: It is not initialized. jpos.JposException:它未初始化。 at jp.co.epson.upos.pntr.CommonPrinterService.checkInitialized(Unknown Source) at jp.co.epson.upos.pntr.CommonPrinterService.sendOutputData(Unknown Source) at jp.co.epson.upos.pntr.CommonPrinterService.sendOutputData(Unknown Source) at jp.co.epson.upos.pntr.CommonPrinterService.executeNormalPrint(Unknown Source) at jp.co.epson.upos.pntr.CommonPrinterService.printNormal(Unknown Source) at jpos.POSPrinter.printNormal(Unknown Source) at Printer.(Printer.java:146) at Main.main(Main.java:28) 在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)

I tried this on two different PC's (Vista and XP 32bit), with the same Versions and Tools, but it's always the same. 我在两台不同的PC(Vista和XP 32bit)上试用了相同的版本和工具,但它总是一样的。

I also tried the JavaPos Example Test App and the EpsonHealtCheckTool. 我还尝试了JavaPos示例测试应用程序和EpsonHealtCheckTool。 It's also the same with this tools. 这个工具也是一样的。

Don't know what else to try, does everyone knows the problem? 不知道还有什么可以尝试,大家都知道这个问题吗?

PS: My Printer Epson TM-U220A, the serial connection seems to work, because when I try to claim the Printer and another Application uses the COM Port, My App says that the Port is not available. PS:我的打印机Epson TM-U220A,串口连接似乎有效,因为当我尝试声明打印机而另一个应用程序使用COM端口时,我的应用程序说端口不可用。

Thanks. 谢谢。

I've found out whats the issue: I used the wrong cable. 我发现了最新的问题:我使用了错误的电缆。

I made my own, see the Epson documentation below: 我自己制作,请参阅下面的Epson文档:

用于Epson POS打印机的零调制解调器电缆

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

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