--- old/test/jdk/java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 2019-05-31 18:34:41.004854223 +0300 +++ new/test/jdk/java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 2019-05-31 18:34:40.724856553 +0300 @@ -38,7 +38,7 @@ * @bug 8073320 * @summary Windows HiDPI support * @author Alexander Scherbatiy - * @requires (os.family == "windows") + * @requires (os.family == "linux" | os.family == "windows") * @run main/othervm -Dsun.java2d.win.uiScaleX=3 -Dsun.java2d.win.uiScaleY=2 * HiDPIRobotScreenCaptureTest */ @@ -50,11 +50,13 @@ public static void main(String[] args) throws Exception { - try { - UIManager.setLookAndFeel( - "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); - } catch (Exception e) { - return; + if (System.getProperty("os.name").toLowerCase().contains("win")) { + try { + UIManager.setLookAndFeel( + "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); + } catch (Exception e) { + return; + } } Frame frame = new Frame();