posted 22 years ago
Hi,
Please Help Me....
I got an external process running using Process object's exec() method,but it is taking more time (I think that external process is blocked) to complete.So my problem is how can I kill this process after some predefined time so that the remaining program control can be resumed.
This is my code block
=======================
try {
Runtime r;
Process p=null;
r = Runtime.getRuntime();
p = r.exec("d:\\pdftotxt\\pdf2text\\pdf2html-0.92\\pdftotext d:\\pdftotxt\\pdf2text\\pdf2html-0.92\\cllllfinal.pdf
d:\\pdftotxt\\pdf2text\\pdf2html-0.92\\checkpdf.txt");
p.waitFor();
}catch(Exception e) {
e.printStackTrace();
}
=======================
How can control that p.waitFor() such that after some time it should end and remaining program should
be resumed.
Please reply me as soon as you can, its urgent..... :-(
Srinivasa Vallabha