<p>I have a Java application that launches another java application.  The launcher has a watchdog timer and receives periodic notifications from the second VM.  However, if no notifications are received then the second virtual machine should be killed and the launcher will perform some additional clean-up activities.</p>

<p>The question is, is there any way to do this using only java? so far I have to use some native methods to perform this operation and it is somehow ugly.</p>

<p>Thanks!</p>

You should be able to do that
```
java.lang.Runtime.exec
```
and shell commands.