Getting started with Java POS development

12,795

Solution 1

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.

Solution 2

"I wonder when JavaPOS was written as a standard, why it was not considered to implement a Printer query mechanism so that one could just query the underlying system registry and find any conneccted JavaPos device. Do you have any idea how to do the above? I don't think it's implemented. For end user running a utility to generate a jpos.xml and then modify the files/cofniguration does not make any sense to me. – Alam Sher Sep 22 at 8:21 "

Generally on Pos system, peripherals are connected to serial ports and are not declared in os (microsoft, linux, ires ...). In many pos system, constructor provide their own implementation and tools for javapos (like ibm, toshiba ... http://www-01.ibm.com/support/docview.wss?uid=pos1R4000014) to help you to discover wich device is connected and build your jpos.xml.

Share:
12,795
ask-dev
Author by

ask-dev

Updated on August 01, 2022

Comments

  • ask-dev
    ask-dev almost 2 years

    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?

  • ask-dev
    ask-dev over 10 years
    I wonder when JavaPOS was written as a standard, why it was not considered to implement a Printer query mechanism so that one could just query the underlying system registry and find any conneccted JavaPos device. Do you have any idea how to do the above? I don't think it's implemented. For end user running a utility to generate a jpos.xml and then modify the files/cofniguration does not make any sense to me.
  • ask-dev
    ask-dev over 10 years
    Accepting the answer as there's practically no more useful information about this technology over internet than this one :)
  • ice
    ice over 10 years
    @AlamSher. The utilities provided by your printer vendor generally has a tool that can auto-generate and modify the jpos.xml for you so this shouldn't be difficult. AFAIK, JavaPOS does not support the scenario you mentioned.