Getting started with Java POS development

ask-dev picture ask-dev · Sep 18, 2013 · Viewed 12.4k times · Source

I have a requirement where I need to connect to a POS printer from a Java Swing App. What I came to know that there's a standard called Java POS to achieve this.

Now the problem is on java POS website (http://www.javapos.com/) I did not find anything that is helpful in getting me started.

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

Can someone guide me in the right direction? Where to begin my quest about using Java POS connect to a POS Printer and then print some data successfully?

Answer

ice picture ice · Sep 20, 2013

I just started on the same quest and I think that the best way to do is to grab yourself a receipt printer from a well-known vendor such as Epson or Star Micronics. They normally provide enough documentation on to get started on the whole process. The device simulator is too complex and seems to be a bit buggy in my opinion.

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

  1. Generate a jpos.xml containing device specific information. The vendor should have a program which can generate this information for you.
  2. Modify the jpos.properties under $jpos.jar/jpos/res to point it to the location of your jpos.xml. Note: Your vendor tool may do this automatically for you.
  3. Add all the necessary libraries
  4. Start on the sample codes provided by your vendor

The somewhat incomplete documentation of JavaPOS can be found as part of the UPOS documentation in Appendix B located at http://www.nrf-arts.org/content/unifiedpos Also, the latest programming guide on JavaPOS that I found is here.

Hope this helps.