--- old/test/java/lang/Runtime/exec/LotsOfDestroys.java 2014-02-24 21:03:30.320725077 +0400 +++ new/test/java/lang/Runtime/exec/LotsOfDestroys.java 2014-02-24 21:03:29.740725092 +0400 @@ -31,16 +31,17 @@ import java.io.File; public class LotsOfDestroys { + static final boolean isWindows = + System.getProperty("os.name", "unknown").startsWith("Windows"); static final int RUNS = 400; - static final String ECHO = "/usr/bin/echo"; public static void main(String[] args) throws Exception { - if (File.separatorChar == '\\' || // Windows - !new File(ECHO).exists()) // no echo + if (isWindows) { + System.err.println("Not for Windows"); return; - + } for (int i = 0; i<= RUNS; i++) { - Process process = Runtime.getRuntime().exec(ECHO + " x"); + Process process = Runtime.getRuntime().exec("echo x"); process.destroy(); } }