Simple Java QR Code Generator Example

You may also like...

  • Caleb Bankole Olojo

    It doesn’t work for me. Keeps throwing error.

    Exception in thread “main” java.lang.NoSuchMethodError:;Lcom/google/zxing/BarcodeFormat;IILjava/util/Map;)Lcom/google/zxing/common/BitMatrix;
    at net.glxn.qrgen.QRCode.createMatrix(
    at net.glxn.qrgen.QRCode.writeToStream(
    at parkingSoft.QrTest2.main(

    Please help. Thanks

    • For those getting the NoSuchMethodError, you probably didn’t include the correct dependencies to your project.
      Make sure the net.glxn.qrgen: javase:2.0 is on your classpath.
      This version includes
      – net.glxn.grgen:core:2.0
      – org.jfree:jfreesvg:2.1