Java Servlet Hangs After Creating Barcode

Java Servlet Hangs After Creating Barcode

You are here:
< Back

If the Java Program or Servlet hangs after the creating barcode, use the System.exit(0); command to exit the method creating the barcode. If this does not resolve the issue, similar problems have been associated with a corrupt JVM so try another machine with a different version of the JVM. Usually the System.exit(0); command is placed after the encoder command.

For example:

barCodeEncoder bce = new barCodeEncoder(bc, "JPEG", "newfile.jpg");
System.exit(0);