I don't think so. AWT and Swing are fairly core Java components. Also, Headless Java mode is achieved through with an AWT option (java.awt.headless=true
). Further, from How to Integrate with the Desktop Class -
If an application runs in an environment without a keyboard, mouse, or monitor (a "headless" environment), the
getDesktop()
method throws ajava.awt.HeadlessException
.
So it isn't as simple as compiling without X11 in Java. I believe the actual rendering is still done with X11 libraries (even when operating in headless mode).