Hi Rashid U can use google.zxing api(open source api) for creating and reading 2D Bar Code.
IF u have Bar code image generated u can use this code to decode.
public static void myBarCodeReader() throws IOException, ReaderException{
QRCodeReader qrCodeReader = new QRCodeReader(); int width = 200; int height = 200; BufferedImage img = ImageIO.read(new File("E:/qrcode.png")); BufferedImageMonochromeBitmapSource bufferedImageMonochromeBitmapSource = new BufferedImageMonochromeBitmapSource( img);
//MonochromeBitmapSource monochromeBitmapSource = new MonochromeBitmapSource(); Hashtable hints = new Hashtable(); hints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE); Result result = qrCodeReader.decode(bufferedImageMonochromeBitmapSource); System.out.println(" BarCode number is "+result.getText());