Start developing Java POS

I have a requirement when I need to connect to a POS printer from a Java Swing application. What I learned for this is a standard called Java POS.

Now the problem is the java POS website ( http://www.javapos.com/ ). I did not find anything useful in starting me.

I checked Java POS simulators ( https://code.google.com/p/pos-device-simulator ), but the fact is that even if I start successfully, I don’t understand what to do, how to test any code against these simulators.

Can someone lead me in the right direction? How do I start my search for using Java POS to connect to a POS printer, and then successfully print some data?

+6
source share
2 answers

I just started this quest and I think that the best way to do this is to get a receipt printer from a well-known supplier such as Epson or Star Micronics. Usually they provide enough documentation to start the whole process. The device simulator is too complicated and, in my opinion, a little buggy.

Assuming that you managed to get yourself a printer, here you need to do:

  1. Create a jpos.xml file containing device information. The provider must have a program that can generate this information for you.
  2. Change the jpos.properties properties in $ jpos.jar / jpos / res to point to the location of your jpos.xml. Note. Your vendor tool can do this automatically for you.
  3. Add all required libraries
  4. Start with sample codes provided by your provider.

The somewhat incomplete JavaPOS documentation can be found as part of the UPOS documentation in Appendix B, located at http://www.nrf-arts.org/content/unifiedpos. In addition, the last programming guide for JavaPOS that I found is here: http: //www.javapos.com/downloads/javaPOSv1.4.pdf

Hope this helps.

+5
source

“I wonder when JavaPOS was written as a standard, why it was not considered that it implements a mechanism for requesting a printer, so that you can simply query the base registry and find any connected JavaPos device. Do you have any ideas on how to do this?” I don’t think it’s implemented. For the end user running the utility to generate jpos.xml and then changing the files / configuration it makes no sense to me. - Alam Sher Sep 22 at 8:21 "

Typically, a Pos system, peripherals are connected to serial ports and are not advertised in os (microsoft, linux, ires ...). On many pos systems, the constructor provides its own implementation and tools for javapos (e.g. ibm, toshiba ... http://www-01.ibm.com/support/docview.wss?uid=pos1R4000014 ) to help you discover with which the device is connected and create your jpos.xml file.

+2
source

Source: https://habr.com/ru/post/954103/


All Articles