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

Discussion in 'Java' started by rabbits77, Feb 25, 2004.

  1. rabbits77

    rabbits77 Guest

    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!!
    rabbits77, Feb 25, 2004
    #1
    1. Advertising

  2. Re: how do I let a process started via Runtime.exec() run after theparent thread returns?

    rabbits77 wrote:

    > 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
    John C. Bollinger, Feb 25, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul  Smith
    Replies:
    2
    Views:
    10,158
    Lothar Kimmeringer
    Nov 5, 2004
  2. Jaap de Bergen
    Replies:
    3
    Views:
    2,207
    Jaap de Bergen
    Nov 26, 2004
  3. Hal Vaughan
    Replies:
    11
    Views:
    1,090
    Gordon Beaton
    May 22, 2006
  4. Chris Angelico
    Replies:
    0
    Views:
    160
    Chris Angelico
    Jul 20, 2012
  5. Kushal Kumaran
    Replies:
    0
    Views:
    149
    Kushal Kumaran
    Jul 20, 2012
Loading...

Share This Page