X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=getdown%2Fsrc%2Fgetdown%2Flauncher%2Fsrc%2Fmain%2Fjava%2Fcom%2Fthreerings%2Fgetdown%2Flauncher%2FGetdownApp.java;h=5e168ff240590f4ab26ddf6f24f05be5a99c6fd8;hb=dbfa10a0954d79fe8f0cde05dd23aa86efc3885b;hp=0c8cac5acb2f48bb6f0c94e95f1bdb61c9eb2829;hpb=649af941146ec3b4e40bb0b7901ce7f8b382ebce;p=jalview.git diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java index 0c8cac5..5e168ff 100644 --- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java +++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java @@ -29,6 +29,7 @@ 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; import com.threerings.getdown.data.SysProps; import com.threerings.getdown.util.LaunchUtil; @@ -93,14 +94,13 @@ public class GetdownApp try { - log.info("**** Registering i4j StartupNotification Listener"); StartupNotification.registerStartupListener( new StartupNotification.Listener() { @Override public void startupPerformed(String parameters) - { - log.info("**** adding startup parameters '"+parameters+"'"); - GetdownApp.setStartupFilesParameterString(parameters); + { + log.warning("StartupNotification.Listener.startupPerformed: '"+parameters+"'"); + setStartupFilesParameterString(parameters); } }); } catch (Exception e) @@ -108,8 +108,6 @@ public class GetdownApp e.printStackTrace(); } - Thread.sleep(500); - // record a few things for posterity log.info("------------------ VM Info ------------------"); log.info("-- OS Name: " + System.getProperty("os.name")); @@ -120,7 +118,6 @@ public class GetdownApp log.info("-- User Name: " + System.getProperty("user.name")); log.info("-- User Home: " + System.getProperty("user.home")); log.info("-- Cur dir: " + System.getProperty("user.dir")); - log.info("-- JVL: " + System.getProperty("jvl")); log.info("-- startupFilesParameterString: " + startupFilesParameterString); log.info("---------------------------------------------"); @@ -270,6 +267,12 @@ public class GetdownApp protected JFrame _frame; }; + + String startupFile = getStartupFilesParameterString(); + if (!StringUtil.isBlank(startupFile)) { + Application.setStartupFilesFromParameterString(startupFile); + } + app.start(); return app; } @@ -277,4 +280,8 @@ public class GetdownApp public static void setStartupFilesParameterString(String parameters) { startupFilesParameterString = parameters; } + + public static String getStartupFilesParameterString() { + return startupFilesParameterString; + } }