How can I write a program that reads in a bar code (with : denoting half bars and | denoting full bars) and prints out the zip code it represents. Print an error message if the bar code is not correct.

Once again I am very new to java and still learning and would like your help on writing this program.

very new to Java? then do yourself a huge favour and first learn Java.

commented: nice +14

would like your help on writing this program.

There are meny people here who will help you, nobody who will do it for you. Show what you have done so far.

This page is a demonstration and tutorial of how to generate barcode images using [Java Barcode Generator library]<URL SNIPPED> in your Java programs. Please firstly download free Java Barcode Library trial.

the OP is not trying to generate, but to read barcodes.

More to the point, the original post was over a month ago; presumably, the project was due already. In any case, it is unlikely that the 'bar code' the OP was reading was in a standard format, given the representation of the bar code as bars and colons.

Commercial product with licence in thousand pounds, bahh! If you wish to provide link to library then post good open source not comercial stuff...

One of my favourites although not specifically java related is zBar.

The algo is able to read bar codes at different angels and orientations.

I wonder whether you are a long-term user of barcodes generating? If not, the free trials of some professional barcode generator are good choices for you. You could refer to their tutorial pages<SNIPPED URL> for help about the CODE of your program.

the OP hasn't posted in this Thread for two months. I doubt (s)he 's still reading this.

@arronlee commercial products are not welcome, secondly your link was leading to C# and .NET examples and this is Java forum therefore link removed