test/java/lang/Runtime/exec/ExecWithDir.java

Print this page

        

*** 26,40 **** * @run main/othervm/timeout=300 ExecWithDir * @summary Ensure that we can fork-and-exec repeatedly when a new working * directory is specified */ ! import java.io.*; public class ExecWithDir { ! private static final String CMD = "/bin/true"; private static final int N = 500; public static void main(String args[]) throws Exception { if (! new File(CMD).canExecute()) return; --- 26,40 ---- * @run main/othervm/timeout=300 ExecWithDir * @summary Ensure that we can fork-and-exec repeatedly when a new working * directory is specified */ ! import java.io.File; public class ExecWithDir { ! private static final String CMD = UnixCommands.findCommand("true"); private static final int N = 500; public static void main(String args[]) throws Exception { if (! new File(CMD).canExecute()) return;