Read QRCode in JAVA

Hello Friends,

As in earlier post we had learn what is QR code and how can we generate QR code in java and servlet.

Now here today we will learn how can we read QR Code in java.

Here again i had use same jar file as we had previuos. ZXing- Zibra Corossing

Here is code to read QR Code.

import javax.imageio.ImageIO;


public class QRReader {

public static void main(String args[]){

Result result = null;
BinaryBitmap binaryBitmap;


binaryBitmap = new BinaryBitmap(new HybridBinarizer(new BufferedImageLuminanceSource( FileInputStream("D:/Generated_QR.PNG")))));
result = new MultiFormatReader().decode(binaryBitmap);
System.out.println("QR Code : "+result.getText());

}catch(Exception ex){


Hope you like it. Cheers… 🙂




About Sanju
I am Software Programmer. I am working in JAVA/J2EE Technologies.

One Response to Read QRCode in JAVA

  1. sainath says:

    thanku very much sir.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: