Generate QR Code using Java

Code With Arjun
2 min readOct 27, 2021

To Create QR code we will be using zxing library on maven project.

Generate QR code using Java

Create a maven project using any IDE i will be using Intellij Create New project and choose maven.

Create Maven Project

Once you create maven project just go to the pom.xml file

Pom.xml file

and add these two dependencies in pom.xml file.

For Zxing Core

<!-- https://mvnrepository.com/artifact/com.google.zxing/core -->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.4.1</version>
</dependency>

For ZXing Java SE Extensions

<!-- https://mvnrepository.com/artifact/com.google.zxing/javase -->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.4.1</version>
</dependency>

Then Create and new Java class and name Generate QR Code

This will create a QRcode on Desktop location and when scanned it will show the link to visit my youtube channel www.youtube.com/arjuncodes

QR Code Generated

You can use the https://pageloot.com/qr-code-scanner/#upload this online scanner or any mobile apps to scan the QR Code.

If you liked my blog please buy me a coffee

Please don’t forget to follow me on the medium if you liked my blogs.

Also subscribe to my youtube channel to get the latest programming related tutorials.

www.youtube.com/arjuncodes

--

--