I have been experiencing a weird problem that I can’t find a solution to. When I am running a project through ant and there’s an uncaught exception, ant simply freezes with absolutely no error. Here is my build file. This is a multi threaded environment, also
<fileset id="masterlibs" dir="${lib.dir}">
<patternset>
<include name="*.jar"/>
</patternset>
</fileset>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="init">
<mkdir dir="${build.dir}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src.dir}" destdir="${build.dir}">
<classpath>
<pathelement location="${build.dir}"/>
<fileset refid="masterlibs"/>
</classpath>
</javac>
</target>
<target name="run" depends="compile">
<java classname="stockData.AlertHandler" fork="true">
<classpath>
<pathelement location="${build.dir}"/>
<fileset refid="masterlibs"/>
</classpath>
<arg line="true"/>
<arg line="true"/>
<arg line="true"/>
<arg line="true"/>
<arg line="false"/>
<arg line="27_4"/>
<arg line="false"/>
</java>
</target>
Ctrl+Break will show you a dump of threads and indicate what each is doing (plus any deadlocks). I’m guessing it’s your spawned
AlertHandlerprocess and it may be easier to debug this outside the Ant environment.If Ctrl+Break doesn’t work (from the article)