protected static boolean isInHeadlessEnvironment() {
   return GraphicsEnvironment.isHeadless();
 }
Exemple #2
0
  public static boolean isHeadlessEnv() {
    Application app = ApplicationManager.getApplication();
    if (app == null) return GraphicsEnvironment.isHeadless();

    return app.isUnitTestMode() || app.isHeadlessEnvironment();
  }