Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Barcode Scanner

 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all! I'm currently developing a swing application which has bar code scanner. I have a USB Barcode scanner with me which doesn't need any driver. Now what I want barcode scanner to read the barcode and display it in a JTextField so that I can store that in a database. I searched about it on google! All I found was that I should use javax.comm package and implement that but I'm not able to do it. I need suggestions about this as am new to this all.! Many Thnaks..!!
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed this code and it throws javax.comm.NoSuchPortException Exception.



what can I do?
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you have a USB scanner -- and you decided to use software that allows your code to communicate with a serial port? That doesn't make a lot of sense to me, since a serial port is not a USB port. So I suggest you hold on a minute and read the documentation for the scanner to see how it works. If it doesn't require a driver then there must be some other way for an application (whether written in Java or not) to communicate with it, and the documentation should spell out what that way is.
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:So you have a USB scanner -- and you decided to use software that allows your code to communicate with a serial port? That doesn't make a lot of sense to me, since a serial port is not a USB port. So I suggest you hold on a minute and read the documentation for the scanner to see how it works. If it doesn't require a driver then there must be some other way for an application (whether written in Java or not) to communicate with it, and the documentation should spell out what that way is.


Hmmm!! Makes Sense..!! Well in that case I'd go through the documentation first and will reply in the same port if I still experience any difficulty however i request you to please keep watch on this thread for me.! Many thanks..!!! :)
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And just in case there is no special driver or library that comes with the scanner, check out the http://www.coderanch.com/how-to/java/JavaIoFaq for some hints on how to access USB devices from within Java code.
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey all as usual I did not a satisfactory information about what I needed. Please guide me through this as I only want to read a barcode using barcode scanner and to store that number in the database. Please...Please...Please...!!!
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, what *did* you find in the documentation? What did you find by searching for something like "DEVICE-NAME java access usb"? Remember that we have no idea what kind of device it is, nor how it might work.
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember that we have no idea what kind of device it is, nor how it might work


well its an iBall Linear barcode scanner
 
Darryl Burke
Bartender
Posts: 5155
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pranit Sonawane wrote:I have developed this code ...


You're Geronimo?
http://stackoverflow.com/questions/8146840/barcode-scanner-implementation-on-java
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Is there any way that I can use zxing library and how can I do that?
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're Geronimo?


yessss!!! Actually my that bit of code worked with Honeywell's Barcode scanner but now I want to use iBall's one. Trust me I'm now really confused what changes should be made?
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last time I used a barcode scanner like that, the way it worked was that it put all of the scanned data into a certain file on a (very small) internal hard drive in a particular format. Then to access the scanned data via USB you would simply figure out what drive it was mapped to and look for that certain file.

I have no idea whether your scanner works like that, though. Its specs on the web site don't go into that sort of detail. You need to get its technical manual to find the real answer. I notice there's a "Support" section on the company's website and if you can't track down the device's documentation you should ask them for it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!