How to create new process as its own parent process?

In one process, how can we create another process that is an exact copy of the parent?

user707549 at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

You can create another process which has the same command line arguments with Runtime.exec(). However you cannot do a C-style fork from pure Java. It would be heard to imagine why you would want to. I suspect what you are trying to do is best done another way. Can you give more details as you why you want to do this?

Peter Lawrey

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.