JAL-1314 allow 'nogui' and 'headless' as synonyms for 'nodisplay' argument and ensure...
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Thu, 13 Jun 2013 16:37:43 +0000 (17:37 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Thu, 13 Jun 2013 16:37:43 +0000 (17:37 +0100)
src/jalview/bin/Jalview.java

index 5e4569a..142b4c3 100755 (executable)
@@ -128,6 +128,11 @@ public class Jalview
                       + "\n~Read documentation in Application or visit http://www.jalview.org for description of Features and Annotations file~\n\n");
       System.exit(0);
     }
+    if (aparser.contains("nodisplay") || aparser.contains("nogui") || aparser.contains("headless"))
+    {
+      System.setProperty("java.awt.headless", "true");
+      headless=true;
+    }
     Cache.loadProperties(aparser.getValue("props")); // must do this before
     // anything else!
     String defs = aparser.getValue("setprop");
@@ -147,10 +152,6 @@ public class Jalview
       }
       defs = aparser.getValue("setprop");
     }
-    if (aparser.contains("nodisplay"))
-    {
-      System.setProperty("java.awt.headless", "true");
-    }
     if (System.getProperty("java.awt.headless") != null
             && System.getProperty("java.awt.headless").equals("true"))
     {