title: Java equivalent of fork in Java task of Ant?
body: <p><a href="http://ant.apache.org/manual/Tasks/java.html" rel="nofollow noreferrer">Ant Java task</a> provides <code>fork</code> parameter, which, by definition <em>"if enabled triggers the class execution in another VM"</em>. As we are dealing with a large amount of data, setting this parameter saved us from running out of Java heap space.<br>
  We want to be able to do the same through a Java class. What would be the best way to achieve the functionality as provided by <code>fork</code>?</p>