Here is the code segment:
theProgram[0]="cmd /c java AddressBoookGUI";
Runtime rn=Runtime.getRuntime();
try
{
Process proc = rn.exec(theProgram);
}
catch(IOException exception)
{
System.err.println(exception.getMessage());
exception.printStackTrace();
}
I get this error...
java.io.IOException: CreateProcess: "cmd /c java AddressBoookGUI" error=2
CreateProcess: "cmd /c java AddressBoookGUI" error=2
java.io.IOException: CreateProcess: "cmd /c java AddressBoookGUI" error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:64)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:272)
at java.lang.Runtime.exec(Runtime.java:219)
I have tried just "java ..." and "start java ..", both give the same
results.
Thanks for any hep you give,
Troy
Meaning of an exit value varies MUCH by platform. I think I remember some
flavours of Windows use code 2 to mean file-not-found. I mention this mostly
because I'm very curious to know if "cmd /c java AddressBoookGUI" works if you
enter it at the command line. Me, I'd think you'd have to type "cmd /c java
AddressBookGUI" ... but that's certainly a guess without knowledge.
Pat LaVarre p.la...@ieee.org http://members.aol.com/ppaatt/nqjava/