X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FLauncher.java;h=e13f2dd619268cb8aa8f8b82668ab0a692a7143a;hb=752f89e5730d804d1982ce4a09ab0f9266dde03d;hp=c8f2f4840ae9e234528e4b406c34d912ddbb66bc;hpb=d811732f53c406304e5b5302ba986b56e00a36a2;p=jalview.git diff --git a/src/jalview/bin/Launcher.java b/src/jalview/bin/Launcher.java index c8f2f48..e13f2dd 100644 --- a/src/jalview/bin/Launcher.java +++ b/src/jalview/bin/Launcher.java @@ -20,6 +20,8 @@ */ package jalview.bin; +import java.util.Locale; + import java.io.File; import java.io.IOException; import java.lang.management.ManagementFactory; @@ -152,13 +154,16 @@ public class Launcher { // -Xdock:name=... doesn't actually work :( // Leaving it in in case it gets fixed - command.add("-Xdock:name=" + "Jalview"); + command.add( + "-Xdock:name=" + ChannelProperties.getProperty("app_name")); } } String scalePropertyArg = HiDPISetting.getScalePropertyArg(); if (scalePropertyArg != null) { + System.out.println("Running " + startClass + " with scale setting " + + scalePropertyArg); command.add(scalePropertyArg); } @@ -167,11 +172,16 @@ public class Launcher final ProcessBuilder builder = new ProcessBuilder(command); - // System.out.println("COMMAND: " + String.join(" ", builder.command())); + if (Boolean.parseBoolean(System.getProperty("launcherprint", "false"))) + { + System.out.println( + "LAUNCHER COMMAND: " + String.join(" ", builder.command())); + } System.out.println("Running " + startClass + " with " - + (memSetting == null ? "no memory setting" : memSetting)); + + (memSetting == null ? "no memory setting" + : ("memory setting " + memSetting))); - if (Boolean.parseBoolean(System.getProperty("launcherstop"))) + if (Boolean.parseBoolean(System.getProperty("launcherstop", "false"))) { System.exit(0); } @@ -182,7 +192,7 @@ public class Launcher process.waitFor(); } catch (IOException e) { - if (e.getMessage().toLowerCase().contains("memory")) + if (e.getMessage().toLowerCase(Locale.ROOT).contains("memory")) { System.out.println("Caught a memory exception: " + e.getMessage()); // Probably the "Cannot allocate memory" error, try without the memory