JAL-3310 JAL-3300 two getdown fixes merged
[jalview.git] / getdown / src / getdown / launcher / src / main / java / com / threerings / getdown / launcher / GetdownApp.java
index 367db7c..2d19089 100644 (file)
@@ -27,7 +27,6 @@ import javax.swing.JFrame;
 import javax.swing.KeyStroke;
 import javax.swing.WindowConstants;
 
-import com.install4j.api.launcher.StartupNotification;
 import com.samskivert.swing.util.SwingUtil;
 import com.threerings.getdown.data.Application;
 import com.threerings.getdown.data.EnvConfig;
@@ -35,6 +34,7 @@ import com.threerings.getdown.data.SysProps;
 import com.threerings.getdown.util.LaunchUtil;
 import com.threerings.getdown.util.StringUtil;
 import static com.threerings.getdown.Log.log;
+import jalview.bin.StartupNotificationListener;
 
 /**
  * The main application entry point for Getdown.
@@ -94,18 +94,16 @@ public class GetdownApp
 
     try
     {
-      StartupNotification.registerStartupListener(
-              new StartupNotification.Listener() {
-                @Override
-                public void startupPerformed(String parameters)
-                { 
-                  log.warning("StartupNotification.Listener.startupPerformed: '"+parameters+"'");
-                  setStartupFilesParameterString(parameters);
-                }
-              });
+      jalview.bin.StartupNotificationListener.setListener();
     } catch (Exception e)
     {
       e.printStackTrace();
+    } catch (NoClassDefFoundError e)
+    {
+      log.warning("Starting without install4j classes");
+    } catch (Throwable t)
+    {
+      t.printStackTrace();
     }
     
     // record a few things for posterity