Deleting firefox profile folder from java
<p>I am starting a firefox with a temporary firefox profile folder. When the user closes swing UI, I am destroying the process using java.lang.Process#destroy. And when I immediately try to remove the folder, it throws exception since the firefox process has not terminated yet.</p>

<p>Is there a way to remove the directory when the process has terminated completely without adding a delay(Thread.sleep).</p>
