You can just use a Java barcode reader(www.onbarcode.com/products/java_barcode_reader). It is easy to read barcode in Java with a tool like this. You can just add this tool in your program and read the barcode.