HeadlessDisplayDevice headlessDisplay = new HeadlessDisplayDevice();
CoreRegistry.putPermanently(DisplayDevice.class, headlessDisplay);
initHeadless();
CoreRegistry.putPermanently(NUIManager.class, new NUIManagerInternal(new HeadlessCanvasRenderer()));
// CoreRegistry.putPermanently(DefaultRenderingProcess.class, new HeadlessRenderingProcess());
}