Hi!
I'm having a problem - I'm calling an external Process with
[CODE=java]
Process p = Runtime.getRunt ime().exec("cmd /c ...");
[/CODE](of course, without the dots but with a command instead) and have to wait for that Process to be completed before progressing. However, if I try waiting with:
[CODE=java]p.waitFor();[/CODE]or like this:
[CODE=java]
boolean finished = false;
while(!finished )
{
try
{
p.exitValue();
finished = true;
}
catch(IllegalTh readStateExcept ion itse){}
}
[/CODE]it goes into an infinite loop or something. Can anyone at least give me a hint? I'm feeling totally lost right now...
Greetings,
Nepomuk
I'm having a problem - I'm calling an external Process with
[CODE=java]
Process p = Runtime.getRunt ime().exec("cmd /c ...");
[/CODE](of course, without the dots but with a command instead) and have to wait for that Process to be completed before progressing. However, if I try waiting with:
[CODE=java]p.waitFor();[/CODE]or like this:
[CODE=java]
boolean finished = false;
while(!finished )
{
try
{
p.exitValue();
finished = true;
}
catch(IllegalTh readStateExcept ion itse){}
}
[/CODE]it goes into an infinite loop or something. Can anyone at least give me a hint? I'm feeling totally lost right now...
Greetings,
Nepomuk
Comment