Java - C-Like Fork?

JavaCFork

Java Problem Overview


Is it possible to do a "C like" fork in java, using an new independent jvm process ?

How?

Java Solutions


Solution 1 - Java

This answer is probably a little late but:

http://akuma.kohsuke.org/

seems to be exactly what your looking for

Solution 2 - Java

Funnily, I am just working on this: a Java process running other Java processes. I used the article From Runtime.exec() to ProcessBuilder as a solid base, and When Runtime.exec() won't as a good advice how to gobble the output streams.

PS.: For those wondering, I had to do that (instead of spawning new threads) because yet another Java process is checking the presence of these processes which are, normally, ran separately with shell commands.

Solution 3 - Java

The Application Isolation API (JSR 121) introduces Isolate which addresses this use case.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsakanaView Question on Stackoverflow
Solution 1 - Javauser525362View Answer on Stackoverflow
Solution 2 - JavaPhiLhoView Answer on Stackoverflow
Solution 3 - JavaMarkus MalkuschView Answer on Stackoverflow