JAL-4020 class formatting
[jalview.git] / src / jalview / bin / Launcher.java
index fe4b7ef..1ea17d6 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.bin;
 
+import java.util.Locale;
+
 import java.io.File;
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
@@ -27,6 +29,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import jalview.util.ChannelProperties;
+import jalview.util.LaunchUtils;
 
 /**
  * A Launcher class for Jalview. This class is used to launch Jalview from the
@@ -105,8 +108,8 @@ public class Launcher
     }
 
     // use saved preferences if no cmdline args
-    boolean useCustomisedSettings = Boolean.parseBoolean(LaunchUtils
-            .getUserPreference(MemorySetting.CUSTOMISED_SETTINGS));
+    boolean useCustomisedSettings = LaunchUtils
+            .getBooleanUserPreference(MemorySetting.CUSTOMISED_SETTINGS);
     if (useCustomisedSettings)
     {
       if (jvmmempc == null)
@@ -207,7 +210,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