JAL-940 JAL-1378 EOL comment on JWS v1 services
[jalview.git] / src / jalview / gui / Desktop.java
index c9b8de2..6f516e5 100644 (file)
@@ -59,7 +59,6 @@ import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Hashtable;
@@ -83,7 +82,6 @@ import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JPopupMenu;
 import javax.swing.JProgressBar;
-import javax.swing.JTextArea;
 import javax.swing.SwingUtilities;
 import javax.swing.event.HyperlinkEvent;
 import javax.swing.event.MenuEvent;
@@ -649,8 +647,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     // A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
     // IF JALVIEW IS RUNNING HEADLESS
     // ///////////////////////////////////////////////
-    if (System.getProperty("java.awt.headless") != null
-            && System.getProperty("java.awt.headless").equals("true"))
+    if (instance == null || (System.getProperty("java.awt.headless") != null
+            && System.getProperty("java.awt.headless").equals("true")))
     {
       return;
     }
@@ -2438,7 +2436,9 @@ public class Desktop extends jalview.jbgui.GDesktop implements
   {
     boolean alive = true;
     Thread t0 = null, t1 = null, t2 = null;
-
+    // JAL-940 - JALVIEW 1 services are now being EOLed as of JABA 2.1 release
+    if (true)
+    {
     // todo: changesupport handlers need to be transferred
     if (discoverer == null)
     {
@@ -2448,8 +2448,6 @@ public class Desktop extends jalview.jbgui.GDesktop implements
     }
     // JAL-940 - disabled JWS1 service configuration - always start discoverer
     // until we phase out completely
-    if (true)
-    {
       (t0 = new Thread(discoverer)).start();
     }