Merge branch 'feature/JAL-629_--output_-_means_output_to_STDOUT' into improvement...
[jalview.git] / src / jalview / util / LaunchUtils.java
index 784eb5a..e4f393c 100644 (file)
@@ -29,6 +29,8 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Properties;
 
+import jalview.bin.Console;
+
 public class LaunchUtils
 {
 
@@ -75,7 +77,7 @@ public class LaunchUtils
         return null;
       } catch (IOException e)
       {
-        System.err.println(e.getMessage());
+        jalview.bin.Console.errPrintln(e.getMessage());
         return null;
       }
     }
@@ -113,22 +115,22 @@ public class LaunchUtils
               null);
       if (JCV == null)
       {
-        System.out.println(
+        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;
     }
 
@@ -152,7 +154,7 @@ public class LaunchUtils
       String JV = System.getProperty("java.version");
       if (JV == null)
       {
-        System.out.println("Could not obtain java.version for comparison");
+        Console.errPrintln("Could not obtain java.version for comparison");
         return -2;
       }
       if (JV.startsWith("1."))
@@ -163,7 +165,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;
@@ -184,7 +186,7 @@ public class LaunchUtils
 
     if (java_compile_version <= 0 || java_version <= 0)
     {
-      System.out.println("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