• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

waitFor Control

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic