Name: rm29839 Date: 12/10/97
Try this little bit of code on a WinNT box - the process.waitFor() call fails
to ever return. Works fine on HP/Sun/Linux JDK running 1.1.3.
String command = "C:/dev/jdk/bin/java";
System.out.println("---> Executing "+command);
Process process = Runtime.getRuntime().exec(command);
System.out.println("---> Waiting for completion of waitFor()");
process.waitFor();
System.out.println("---> waitFor() completed");
The waitFor() never returns - fails for all applications
import java.io.*;
public class Test {
public static void main (String[] args){
try{
String command = "e:\win32\bin\java";
//change this to match where your java lives
System.out.println("--->Executing " + command);
Process process = Runtime.getRuntime().exec(command);
System.out.println("--->Waiting for completion of " + command);
process.waitFor();
System.out.println("--->Done Waiting!");
}catch(IOException e){}catch (InterruptedException e){}
}
}
This works fine under 1.1.5 on Solaris, but on win32
(Review ID: 21666)
======================================================================
- relates to
-
JDK-4368399 JDI: -verbose option passed to debugger launcher fails and hangs vm
-
- Closed
-