Launching, timing, and killing a child EXE process

N

no_suchluck

Hi All:

I'm relatively new to java, but had the following question: What is
the best way to launch a child EXE (non blocked, obviously), time the
execution of the EXE, and terminate the EXE if it is taking too long?
Short examples would also be helpful.

Thanks for any help...
 
K

Knute Johnson

Hi All:

I'm relatively new to java, but had the following question: What is
the best way to launch a child EXE (non blocked, obviously), time the
execution of the EXE, and terminate the EXE if it is taking too long?
Short examples would also be helpful.

Thanks for any help...

See the docs;

ProcessBuilder and Process classes.

Use the Process.waitFor() method and interrupt the waiting thread on
timeout.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top