JAL-629 Change all stdout and stderr output to use Console.outPrintln and Console...
[jalview.git] / src / jalview / util / LaunchUtils.java
index eb43363..615536a 100644 (file)
@@ -67,7 +67,7 @@ public class LaunchUtils
         return null;
       } catch (IOException e)
       {
-        System.err.println(e.getMessage());
+        jalview.bin.Console.errPrintln(e.getMessage());
         return null;
       }
     }
@@ -105,22 +105,22 @@ public class LaunchUtils
               null);
       if (JCV == null)
       {
-        Console.outputMessage(
+        Console.errPrintln(
                 "Could not obtain JAVA_COMPILE_VERSION for comparison");
         return -2;
       }
       JAVA_COMPILE_VERSION = Integer.parseInt(JCV);
     } catch (MalformedURLException e)
     {
-      System.err.println("Could not find " + buildDetails);
+      jalview.bin.Console.errPrintln("Could not find " + buildDetails);
       return -3;
     } catch (IOException e)
     {
-      System.err.println("Could not load " + buildDetails);
+      jalview.bin.Console.errPrintln("Could not load " + buildDetails);
       return -4;
     } catch (NumberFormatException e)
     {
-      System.err.println("Could not parse JAVA_COMPILE_VERSION");
+      jalview.bin.Console.errPrintln("Could not parse JAVA_COMPILE_VERSION");
       return -5;
     }
 
@@ -144,8 +144,7 @@ public class LaunchUtils
       String JV = System.getProperty("java.version");
       if (JV == null)
       {
-        Console.outputMessage(
-                "Could not obtain java.version for comparison");
+        Console.errPrintln("Could not obtain java.version for comparison");
         return -2;
       }
       if (JV.startsWith("1."))
@@ -156,7 +155,7 @@ public class LaunchUtils
               : Integer.parseInt(JV.substring(0, JV.indexOf(".")));
     } catch (NumberFormatException e)
     {
-      System.err.println("Could not parse java.version");
+      jalview.bin.Console.errPrintln("Could not parse java.version");
       return -3;
     }
     return JAVA_VERSION;
@@ -177,7 +176,7 @@ public class LaunchUtils
 
     if (java_compile_version <= 0 || java_version <= 0)
     {
-      Console.outputMessage("Could not make Java version check");
+      Console.errPrintln("Could not make Java version check");
       return true;
     }
     // Warn if these java.version and JAVA_COMPILE_VERSION conditions exist