i have a servlet which was used to generate images on the fly. Locally, the servlet worked fine. However, once deployed on the app server, it crashes resulting in the stack trace below. It seems the classes I'm using (ImageJ) to create the images, builds the image using a heavy-weight component (jframe) and an exception is thrown because that component requires a mouse, keyboard, monitor, etc... and apparently this server doesn't have any of that.
Does anyone knwo how I can 'get around' this exception? I've read that setting the -Djava.awt.Headless=true option has worked for some, but many have said it did nothing for them. I'm assuming that I can set this property via System.setProperty("java.awt.Headless", true) and it should have the same effect as command-line parameter, correct?
Please, anything you can offer I would appreciate.