quil

genmeblog 2020-01-15T10:00:40.017Z

When applet is created, surface is also created. As I see in the code P2D/P3D/Java2D modes always somewhere call getScreenDevices or getDefaultScreenDevice functions. They throw HeadlessException when called in headless mode. So in your case you should use virtual framebuffer.

genmeblog 2020-01-15T10:02:38.018600Z

The second option is to use Clojure2d as an alternative. I created this library having exactly your problem in mind. Downside is Java2d mode only.