??????Java??Servlet?????????
???????????? ???????[ 2015/3/4 15:03:21 ] ????????JAVA ??????? ????? QR
?????鸚???????????QR?????????????????????????????á?????????????????????????????????????????????????????QR???????????????????????????????????????????????????????????????????????
????????????????QR???????????????????Java???????????
????QR?????
????QR??Quick Response ?????????????????????????????????????????????????????????????????????????洢??????QR???????????????????С?????????????????????????е?????????ɡ??????????????????????????????????????????????/?????????????е???????????????????????????????
????????????Denso Wave??1994??????QR???????????????????????????QR???????????????????????QR????????????????и??????
??????Java?????QR???Hello World
????Zebra Crossing??ZXing??????????????????????????????Android??JavaSE??iPhone??RIM??Symbian???п??????????ɡ?????QR????????????????????????????QR????????????????????
????QRGen??ZXing???????????????????????Java????QR????С????????????????ZXing?????????????????????ZXing??QRGen??jar????
??????ZXing???????????????????jar????????????????????????????????????????????????
????zxing-core-1.7.jar (346 KB)
????zxing-javase-1.7.jar (21 KB)
????QRGen??jar??????????????????
?????????????classpath?У???????????Java????
package net.viralpatel.qrcode;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import net.glxn.qrgen.QRCode;
import net.glxn.qrgen.image.ImageType;
public class Main {
public static void main(String[] args) {
ByteArrayOutputStream out = QRCode.from("Hello World").to(ImageType.PNG).stream();
try {
FileOutputStream fout = new FileOutputStream(new File(
"C:QR_Code.JPG"));
fout.write(out.toByteArray());
fout.flush();
fout.close();
} catch (FileNotFoundException e) {
// Do Logging
} catch (IOException e) {
// Do Logging
}
}
}
??????Щ????????????????QRCode????????QR????????????????д?????C:QR_Code.jpg?С?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11