--- old/test/java/lang/Runtime/exec/LotsOfOutput.java 2014-02-27 13:19:12.842393754 +0400 +++ new/test/java/lang/Runtime/exec/LotsOfOutput.java 2014-02-27 13:19:12.310393748 +0400 @@ -26,18 +26,17 @@ * @bug 4369826 * @summary Process with lots of output should not crash VM * @author kladko + * @run main/othervm LotsOfOutput */ -import java.io.File; - public class LotsOfOutput { - static final String CAT = "/usr/bin/cat"; - 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 (System.getProperty("os.name").startsWith("Windows")) { + System.err.println("Not for Windows"); return; - Process p = Runtime.getRuntime().exec(CAT + " /dev/zero"); + } + Process p = Runtime.getRuntime().exec(UnixCommands.cat() + " /dev/zero"); long initMemory = Runtime.getRuntime().totalMemory(); for (int i=1; i< 10; i++) { Thread.sleep(100);