JAL-3820 JAL-4189 Move checks for java executable symlinks to LaunchUtils ready for...
[jalview.git] / src / jalview / bin / HiDPISetting.java
index 2bce673..77228c0 100644 (file)
@@ -20,9 +20,8 @@
  */
 package jalview.bin;
 
-import java.util.Locale;
-
 import java.awt.HeadlessException;
+import java.util.Locale;
 
 public class HiDPISetting
 {
@@ -159,7 +158,11 @@ public class HiDPISetting
       dpi = screenInfo.getScreenResolution();
     } catch (HeadlessException e)
     {
-      System.err.println("Cannot get screen resolution: " + e.getMessage());
+      if (isLinux)
+      {
+        System.err
+                .println("Cannot get screen resolution: " + e.getMessage());
+      }
     }
 
     // try and get screen size height and width
@@ -171,8 +174,11 @@ public class HiDPISetting
       mindimension = Math.min(height, width);
     } catch (HeadlessException e)
     {
-      System.err.println(
-              "Cannot get screen size height and width:" + e.getMessage());
+      if (isLinux)
+      {
+        System.err.println("Cannot get screen size height and width:"
+                + e.getMessage());
+      }
     }
 
     // attempt at a formula for scaling based on screen dpi and mindimension.