--- old/test/java/lang/Runtime/exec/LotsOfDestroys.java 2014-02-26 22:54:33.333301669 +0400 +++ new/test/java/lang/Runtime/exec/LotsOfDestroys.java 2014-02-26 22:54:32.624956569 +0400 @@ -26,21 +26,19 @@ * @bug 4637504 4653814 * @summary Destroy should close stderr, stdout and stdin * @author kladko + * @run main/othervm LotsOfDestroys */ -import java.io.File; - public class LotsOfDestroys { 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 (System.getProperty("os.name").startsWith("Windows")) { + 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(UnixCommands.echo() + " x"); process.destroy(); } }