Skip to content

Commit ebaf802

Browse files
committed
Always fork, because Ant misbehaves when calling the main class.
If the main method returns, Ant calls System.exit() and kills the VM. This is almost always wrong. Also, if an exception is thrown, many Ant layers are part of the stacktrace making it hard to quickly assess the problem. Finally, it's just an unsafe way to test an application since the environment isn't clean.
1 parent 2b306a4 commit ebaf802

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</target>
5656

5757
<target name="run" depends="compile" description="Run the application.">
58-
<java classname="${main.class}" classpath="${build.dir}/classes">
58+
<java classname="${main.class}" classpath="${build.dir}/classes" fork="yes">
5959
<classpath refid="build.classpath"/>
6060
<arg value="--name"/>
6161
<arg value="Java"/>

0 commit comments

Comments
 (0)