problem with SimpleCaptcha (java.awt.HeadlessException)
843841Jan 14 2008 — edited Jun 18 2008I have a problem with SimpleCaptcha.
It works on JDK 1.5.x (under Windows) but I recently discovered that it fails on JDK 1.6u3 (under Linux).
The error message:
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64)
nl.captcha.text.imp.DefaultWordRenderer.renderWord(Unknown Source)
nl.captcha.servlet.DefaultCaptchaIml.createImage(Unknown Source)
nl.captcha.servlet.CaptchaServlet.doGet(Unknown Source)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Does anybody know how to fix it?