Hi,
I am trying to run the following peice of code but it is giving me the following runtime error:
java.io.IOException: CreateProcess: dir error=2
try
{
// Execute command
String command = "dir";
Process child = Runtime.getRuntime().exe(command);
// Get input stream to read from it
InputStream in = child.getInputStream();
int c;
while ((c = in.read()) != -1)
{
process((char)c);
}
in.close();
}catch (IOException e)
{
}
What is the problem and how may it be fixed??
Any help greatly appreciated
Thanks,
Patrick.