title: Where to find the heap dump after an "Out Of Memory"
body: <p>I'm using ASANT to run a xml file which points to a NARS.jar file.</p>
  
  <p>I'm getting "java.lang.OutOfMemoryError: Java heap space" and i'm researching around this.</p>
  
  <p>So i have found that i need to set "-XX:+HeapDumpOnOutOfMemoryError", to create a dump file to analyze.</p>
  
  <p>I edited ASANT.bat and added the "-XX:+HeapDumpOnOutOfMemoryError" to ANT_OPTS:</p>
  
  <pre><code>set ANT_OPTS= "-XX:+HeapDumpOnOutOfMemoryError" "-Dos.name=Windows_NT" "-Djava.library.path=%AS_INSTALL%\lib;%AS_ICU_LIB%;%AS_NSS%" "-Dcom.sun.aas.installRoot=%AS_INSTALL%" "-Dcom.sun.aas.instanceRoot=%AS_INSTALL%" "-Dcom.sun.aas.instanceName=server" "-Dcom.sun.aas.configRoot=%AS_CONFIG%" "-Dcom.sun.aas.processLauncher=SE" "-Dderby.root=%AS_DERBY_INSTALL%"  
  </code></pre>
  
  <p>But i can't seem to find any dump file.
  I will use the Eclipse Memory Analyzer to analyze when i find the dump.</p>
  
  <p>I also tried to set the option "-XX:HeapDumpPath=c:\memdump\bds.hprof", but no dump was created there.</p>
  
  <p>Anyone got an idea of what i'm doing wrong?
  Thanks in advance</p>