Java retrieves barcode information from a barcode scanner

I was looking for it. All associated Java APIs are processed on images. They receive information from the barcode contained in the images and print the barcode on the images.

My question is: how to get the barcode directly from the scanner in Java? Is there any API I'm missing to read the barcode directly from the scanner? Or is it necessary to generate an image in memory from information received by the scanner?

+3
java image barcode
source share
2 answers

AFAIK, most barcode scanners have a keyboard emulation mode. You can connect the scanner to your computer, scan the barcode, and the scanner will provide you with barcode information that mimics the usual keystrokes that you can capture in any acceptable way (for example, like keypresslistener or inputfield in Java Swing).

+1
source share

Most modern barcode scanners can be configured to work in sequential emulation mode. If you configured them this way, you can communicate with the device as if you were communicating with a regular serial port (read / write). You can then use the Java library to communicate with the serial device. I used the RxTx library ( http://rxtx.qbang.org/wiki/index.php/Main_Page ), which worked fine on both Windows and Linux.

0
source share

All Articles