Java uses Zxing to generate a QR code. Zxing is a parsing tool provided by Google for bar code (one-dimensional code and two-dimensional code). It provides a method for generating and parsing QR codes, now I will briefly introduce the use of Java to use Zxing to generate and parse the QR code 1, the generation of the QR code 1.1 to add the Zxing-core.jar package to the classpath. 1.2 The MatrixToImageWriter class is used to generate a QR code. This class is provided by Google and can be copied to the source code. Here I paste the source code of this class and can directly use it. Import com. google. zxing. common. bitMatrix; import javax. imageio. imageIO; import java. io. file; import java. io. outputStream; import java. io. IOException; import java. awt. image. bufferedImage; public final class MatrixToImageWriter {private static final int BLACK = 0xFF000000; private static final int WHITE = 0 xFFFFFFFF; private MatrixToImageWriter () {} public static BufferedImage toBufferedImage Trix matrix) {int width = matrix. getWidth (); int height = matrix. getHeight (); BufferedImage image = new BufferedImage (width, height, BufferedImage. TYPE_INT_RGB); for (int x = 0; x <width; x ++) {for (int y = 0; y