} catch (NoClassDefFoundError e)
{
// com.sun.management.OperatingSystemMXBean doesn't exist in this JVM
- System.out.println("No com.sun.management.OperatingSystemMXBean");
+ System.err.println("No com.sun.management.OperatingSystemMXBean");
}
// We didn't get a com.sun.management.OperatingSystemMXBean.
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;
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.
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
--- /dev/null
+package jalview.bin;
+
+import com.threerings.getdown.launcher.GetdownApp;
+import static com.threerings.getdown.Log.log;
+
+public class StartupNotificationListener {
+
+ public static void setListener() {
+
+
+ try {
+ com.install4j.api.launcher.StartupNotification.registerStartupListener(
+ new com.install4j.api.launcher.StartupNotification.Listener() {
+ @Override
+ public void startupPerformed(String parameters) {
+ log.info("StartupNotification.Listener.startupPerformed: '"+parameters+"'");
+ GetdownApp.setStartupFilesParameterString(parameters);
+ }
+ }
+ );
+ } catch (Exception e) {
+ e.printStackTrace();
+ } catch (NoClassDefFoundError t) {
+ log.warning("Starting without install4j classes");
+ }
+
+ }
+
+}
<groupId>com.install4j</groupId>
<artifactId>install4j-runtime</artifactId>
<version>7.0.11</version>
- <!--<scope>provided</scope>-->
+ <scope>provided</scope>
</dependency>
</dependencies>