how do I let a process started via Runtime.exec() run after the parent thread returns?

R

rabbits77

I am starting a process via Runtime.exec(). I would like to allow this
process to continue to run in the background even after the method
which does the Runtime.exec() returns. How do I do this?
Thanks!!
 
J

John C. Bollinger

rabbits77 said:
I am starting a process via Runtime.exec(). I would like to allow this
process to continue to run in the background even after the method
which does the Runtime.exec() returns. How do I do this?

What makes you think it's not happening already? There are a number of
things to understand about Runtime.exec() in order to use it correctly,
but one of them is that the Process it starts is asynchronous with
respect to the thread that started it. I strongly encourage you to read
the API docs of the Runtime and Process classes.


John Bollinger
(e-mail address removed)
 

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,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top