1.导包
2.
public void generateVCode() throws FileNotFoundException, IOException
{
VerifyCode verifyCode=new VerifyCode();
BufferedImage bi=verifyCode.getImage();
System.out.println(verifyCode.getText());
VerifyCode.output(bi, new FileOutputStream("E:/a.jpg"));
}