Hi Dw

I've been cracking my head trying to figure out the best way I can use to inter-react or send direct action commands to the device. Starting by stating what I'm trying to do here. I'm trying to create a POS system I've looked at jpos library packages but I get confused but I've noticed just by looking on a file BillDispenser in the jpos files I can see that it have links to file called BaseJposControl which is extended by a file called BaseControl.

My main problem is that I can't for instance use jpos because file BillDispenser, BillDispenserService111, and all files with Service111 have errors on their public line which is the first line below the imports so I've created my own main menu and validation now the problem is how can I make my for instance transaction class let say be able to send the cashDispenser.dispenseCash(amount); to the cashdispenser device. Just need the skeleton or structure because I get lost in jpos on how I will do this because jpos have many files but I've loaded those files I think they are required to perform this task.

Any help, link, recommendation, and reference will be appreciated.

Thank you.

Recommended Answers

All 3 Replies

What exactly are the error messages?

Starting by the BillDispenser.java file under Capabilities, Properties, and Methods each of it has an error on it "catch(JposException je)" line and if I place a mouse over it a pop up message with a message "exception JposException is never thrown in body of corresponding try statement" but if I comment out the try and all the catch the errors are removed so I can't go that way since I'm not a master and also new in inter-reacting with real hardware so it will be good practice to catch any error so that I can see if everything goes as per my instruction or if there was difficulties in performing the task.

Moving to all those files Service111 and Control111 which have just one error which is in 29 if I look at BillDispenserControl111 which is as follows
Public interface BillDispenserControl111 extends BaseControl

That is the only line with an error and error message is as follows:
Duplicate class:jpos.BillDispenserControl111

So what I did is that I created another project called test1 and on jpos I took the files as follows first I took those files I think they are capable of inter-reacting with the device then I took all those required or linked files to my test1 project to prevent the error file not found errors now the test1 project is fine with no error because I only loaded the selected files from jpos. Files I've loaded in A-Z order are:

AbstractRegPopulator
BaseControl
BaseJposControl
BaseService
BeltService112
CashDispenser "this is not from jpos"
CashDispenserInterface "not from jpos"
CompositeRegPopulator
DataEvent
DefaultCompositePopulator
DefaultDevCatInfoList
DefaultProfile
DefaultProfileRegist
DefaultProperties
DevCat
DevCatInfo
DevCatInfoList
DevCatVisitor
JposConfigException
JposConst
JposEntry
JposEntryRegistry
JposEntryRegistryEvent
JposEntryRegistryListener
JposException
JposProperties
JposPropertiesConst
JposRegPopulator
JposServiceConnection
JposServiceInstance
JposServiceInstanceFactory
JposServiceLoader
JposServiceManager
DirectIOEvent
DirectIOListener
ErrorEvent
EventCallbacks
GateConst
OutputCompleteEvent
Profile
ProfileException
ProfileFactory
ProfileRegistry
PropInfo
PropInfoList
PropInfoViewer
PropType
PropValue
PropValueList
SimpleEntryRegistry
SimpleRegPopulator
SimpleServiceConnection
SimpleServiceManager
Test1
Tracer
TracerFactory
TracerOutput
Tracing
XercesProfileFactory
XmlHelper
jposEvents

Those are all the files I have in test1 project and it works fine just that I don't know which file to call in my either test1 or cashdispenser so that it will send the event or command to the hardware(desired device)

Thank you.

Ok now I've manage to put it all together and now if I run it now it produce an exceptional error that the control is not open.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.