Hi, am working on a project on which I require to read a product bar
code so that it helps to dynamically lookup a products details stored
in a database. I am working using Win XP and I need help on how I can
use javax.comm to do this
Ingo R. Homann - 26 Mar 2007 15:55 GMT
Hi,
> Hi, am working on a project on which I require to read a product bar
> code so that it helps to dynamically lookup a products details stored
> in a database. I am working using Win XP and I need help on how I can
> use javax.comm to do this
Quite easy, but completely different to your approach :-)
Normally, the barcode reader has a driver so that it is possible to
create s simple TextField, in which the driver writes the value that the
barcode has read. You can configure most scanners to send a "newline" as
well to simulate pressing the "enter" key.
So, it is just some simple GUI problem!
Hth,
Ingo
Tor Iver Wilhelmsen - 27 Mar 2007 20:23 GMT
På Mon, 26 Mar 2007 16:48:58 +0200, skrev wamahesimonpeter@yahoo.co.uk
<wamahesimonpeter@yahoo.co.uk>:
> Hi, am working on a project on which I require to read a product bar
> code so that it helps to dynamically lookup a products details stored
> in a database. I am working using Win XP and I need help on how I can
> use javax.comm to do this
This requires either a serial-port barcode reader or a Java API (perhaps
via JNI) to one attached via USB or FireWire. In the first case, you will
normally read your barcode reader's documentation to see how you
initialize it (sending control codes to set the mode etc.). The API
otherwise is event-driven on input, as long as you specify the correct
number of data bits, stop bits etc. The bar code reader I worked with ages
ago also required setting start and end characters to "wrap" the scanned
code.