JAL-3530 Added a -nowebservicediscovery command line argument.
authorBen Soares <b.soares@dundee.ac.uk>
Tue, 1 Dec 2020 14:25:55 +0000 (14:25 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Tue, 1 Dec 2020 14:25:55 +0000 (14:25 +0000)
src/jalview/bin/Jalview.java

index c5e7b80..b5ec365 100755 (executable)
@@ -60,6 +60,7 @@ import jalview.io.DataSourceType;
 import jalview.io.FileFormat;
 import jalview.io.FileFormatException;
 import jalview.io.FileFormatI;
+import jalview.io.FileFormats;
 import jalview.io.FileLoader;
 import jalview.io.HtmlSvgOutput;
 import jalview.io.IdentifyFile;
@@ -287,17 +288,6 @@ public class Jalview
     ArgsParser aparser = new ArgsParser(args);
     boolean headless = false;
 
-    if (aparser.contains("help") || aparser.contains("h"))
-    {
-      showUsage();
-      System.exit(0);
-    }
-    if (aparser.contains("nodisplay") || aparser.contains("nogui")
-            || aparser.contains("headless"))
-    {
-      System.setProperty("java.awt.headless", "true");
-      headless = true;
-    }
     String usrPropsFile = aparser.getValue("props");
     Cache.loadProperties(usrPropsFile); // must do this before
     if (usrPropsFile != null)
@@ -397,6 +387,7 @@ public class Jalview
 
     if (!headless)
     {
+      Desktop.nosplash = aparser.contains("nosplash");
       desktop = new Desktop();
       desktop.setInBatchMode(true); // indicate we are starting up
 
@@ -427,7 +418,10 @@ public class Jalview
        * @j2sIgnore
        */
       {
-        desktop.startServiceDiscovery();
+        if (!aparser.contains("nowebservicediscovery"))
+        {
+          desktop.startServiceDiscovery();
+        }
         if (!aparser.contains("nousagestats"))
         {
           startUsageStats(desktop);