This call is preventing headless apps that use ScriptEngine from running. The way the static init is structured currently, the AWT Toolkit is initialized on registration as a script engine. The AWT Toolkit init should not take place unless the app uses the AppleScriptEngine.
The following example will cause a menu bar to appear on a headless app (when it should not.)
import javax.script.ScriptEngineManager;
public class EngineTest {
public static void main(String[] args) throws Exception {
new ScriptEngineManager();
Thread.sleep(100000);
}
}