I have an Ant task that builds an executable JAR file, runs some JUnit tests, and then runs the executable JAR file to see if it was built correctly. However, the problem is that I have to be next to my computer to shut down my Java program. Is there a way to shut it down from Ant after it runs for maybe a few seconds?
<target name="buildAndTest" depends="create-submission-jar">
<!-- Other stuff happening here -->
<java fork="true" jar="${jar.executable}" failonerror="true" />
</target>