Need help with JavaPOS/UnifiedPOS

Hi, does anyone have any experience with JavaPOS?

The trouble is I can't find any tutorial on 'setting it up' and so I can't find out how to add it to my eclipse/netbeans project... and I can't compile the example code that was supplied with my thermal printer.

I have a Star TSP100ii receipt printer and a Cash Drawer that plugs into the back of the printer via RJ11 port. I've connected it up, installed the futurePRNT software and tested printing and kicking the cash drawer with the config utility... that all worked fine.

I checked the program folder, it has some JavaPOS samples which I'm supposed to be able to use in my project, however trying to compile that Java file gave some error... these were the instructions given in the sample file (to control the Cash Drawer):

jpos.JposException: Service does not exist in loaded JCL registry
at jpos.loader.simple.SimpleServiceManager.createConnection(Unknown Source)
at jpos.loader.JposServiceLoader.findService(Unknown Source)
at StarCashDrawerTest.runTest(StarCashDrawerTest.java:55)
at StarCashDrawerTest.main(StarCashDrawerTest.java:107)
StarCashDrawerTest finished.

This is the line 55:

Java Code:

// open the cashDrawer object according to the entry names defined in jpos.xml
cashDrawer.open("default");

There is a note about this code saying that "default" should be changed:

Java Code:

// NOTE: CHANGE THE CASH DRAWER NAME IN THE cashDrawer.open STATEMENT BELOW TO MATCH YOUR CONFIGURED DEVICE NAME

However, there is no information telling how to find out the 'configured device name'...

This is line 107:

Java Code:

new StarCashDrawerTest().runTest(args);

I have opened the JavaPOS docs (its now called UnifiedPOS) but its not very good... just a PDF file explaining each method available.

Does anyone know how to fix this? & how to add JavaPOS to my project in NetBeans/Eclipse?

Re: Need help with JavaPOS/UnifiedPOS

I didn't realise I was supposed to generate the "jpos.xml" file using the Config Utility that came from the printer vendor...

For Star you open "Configuration Utility", Select Star Line Mode, Click JavaPOS on the left side, press Create JPOS XML Registry File, Click Add New to add your printer and cash drawer - the name comes up automatically if it's connected --press OK, press Apply and the jpos.xml file will be automatically updated, throw that jpos.xml file into your project with the jar files. Also update the CashDrawer.open("default") to the names written in the jpos.xml file... it will say LogicalName="the_name".

Re: Need help with JavaPOS/UnifiedPOS

Hi
Just Check out the logical Name of the printer with cash drawer in jpos.xml or in config.xml(it is existed in TPGPOS printer factory classes).I don't have knowledge on how to operate the star receipt printer.I worked on TPG pos printer.Using config.xml file only you have to communicate with the printer as well as cash drawer.

your open cash drawer code is like this:
cashDrawer.open("logical name of the printer"); //which is defined in config.xml or jpos.xml

Re: Need help with JavaPOS/UnifiedPOS

I tried almost every thing.
Load the jpos.xml with System.setProperty("jpos.config.populatorFile", path_to_jpos_xml); OK
but appeared some other problems, like: "don't find the ????.dll file", so I put the EPSON/JavaPOS/../lib to the java.library.path (ok)
but appeared another problem, I put all .jar file of EPSON on my class path. (ok)
but appeared another problem..... and so on.

It is really very difficult use JPos.

So i have found the Epson Virtual Port Drive application. Thats emulate a USB por with the COM port.

All my problem are solved. I used RXTXcoom.jar and rxtxSerial.dll to print and gave up this JPOS. :/

Re: Need help with JavaPOS/UnifiedPOS

Hi, I have a similar problem testing on POSTest + Star TSP100 + Ubuntu...
I download POSTest and run it successfully with the test GUI up.
I installed STAR TSP100 on my Ubuntu, and got printer to print out a test print out.
I also download all JavaPOS folder from STAR installation CD (so I got all the jcl.jar, jpos110.jar, jpos113-controls.jar, stario.jar, starjavapos.jar from that and put them to my POSTest directory with other jpos110.jar, jpos.xml... from POSTest)
I modified jpos.xml to as follows: