I've inherited some code from a previous developer, which gets built using Ant into an executable jar file that runs by double clicking. The application runs, but under some conditions crashes with an OutOfMemoryError. To investigated this, I'd like to add the -XX:+HeapDumpOnOutOfMemory jvm arg to the Ant buildfile, and as I understand it, the <jvmarg value="-XX:+HeapDumpOnOutOfMemory" />
element needs to go under a <java ...>
task. However, there is no <java ...>
task to be found in this or any other Ant buildfiles in this code base.
How is this even possible? How can the jar file be executable without a <java ...>
task?
I'm asking primarily to find out what in fact makes my jar file executable so that I can figure out where to put that <jvmarg />
element to debug the OOME.
Thanks!