JAL-3130 Helper classes to take Class Exceptions when run in java 1.8 JRE out of...
[jalview.git] / src / jalview / bin / Jalview.java
index cda02fc..60cce46 100755 (executable)
@@ -41,8 +41,6 @@ import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.ws.jws2.Jws2Discoverer;
 
-import java.awt.Image;
-import java.awt.Taskbar;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileOutputStream;
@@ -338,26 +336,15 @@ public class Jalview
       desktop = new Desktop();
       desktop.setInBatchMode(true); // indicate we are starting up
 
-      if (Taskbar.isTaskbarSupported())
+      try
       {
-        Taskbar tb = Taskbar.getTaskbar();
-        if (tb.isSupported(Taskbar.Feature.ICON_IMAGE))
-        {
-          try
-          {
-            java.net.URL url = getClass()
-                    .getResource("/images/JalviewLogo_Huge.png");
-            if (url != null)
-            {
-              Image image = java.awt.Toolkit.getDefaultToolkit()
-                      .createImage(url);
-              tb.setIconImage(image);
-            }
-          } catch (Exception e)
-          {
-            e.printStackTrace();
-          }
-        }
+        JalviewTaskbar.setTaskbar(this);
+      } catch (Exception e)
+      {
+        e.printStackTrace();
+      } catch (Throwable t)
+      {
+        t.printStackTrace();
       }
 
       desktop.setVisible(true);