--- old/test/java/lang/Runtime/exec/LotsOfOutput.java 2014-02-24 21:03:31.672725042 +0400 +++ new/test/java/lang/Runtime/exec/LotsOfOutput.java 2014-02-24 21:03:31.112725057 +0400 @@ -28,16 +28,16 @@ * @author kladko */ -import java.io.File; - public class LotsOfOutput { - static final String CAT = "/usr/bin/cat"; + static final boolean isWindows = + System.getProperty("os.name", "unknown").startsWith("Windows"); - public static void main(String[] args) throws Exception{ - if (File.separatorChar == '\\' || // Windows - !new File(CAT).exists()) // no cat + public static void main(String[] args) throws Exception { + if (isWindows) { + System.err.println("Not for Windows"); return; - Process p = Runtime.getRuntime().exec(CAT + " /dev/zero"); + } + Process p = Runtime.getRuntime().exec("cat /dev/zero"); long initMemory = Runtime.getRuntime().totalMemory(); for (int i=1; i< 10; i++) { Thread.sleep(100);