title: Problems with java heap space, how to increas the heap size?
body: <p>I'm running a ".bat" file which points to asant:</p>
  
  <pre><code>C:\Sun\SDK\bin\asant Startbds
  </code></pre>
  
  <p>asant again points to a xml file i've got, build.xml:</p>
  
  <pre><code>&lt;target name="Startbds" description="Start bds"&gt;
  </code></pre>
  
  <p>
     
      
      
      
      
     
    
   </p>
  
  <p>This has been fine for now, but now i have added more data, which leads to an out of memory error:</p>
  
  <pre><code>java.lang.outOfMemoryError: Java heap space
  </code></pre>
  
  <p>So i've tried to increase the heap space by various methods i've found while searching around for a solution:</p>
  
  <ul>
  <li>cmd: set <code>ANT_OPTS=-Xms512m -Xmx512m</code> (did not work, same error message)</li>
  <li>Editing the asant.bat where i edited the line "-set ANT_OPTS" from</li>
  </ul>
  
  <p>.</p>
  
  <pre><code>set ANT_OPTS="-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>TO</p>
  
  <pre><code>set ANT_OPTS="-Xms512m -Xmx512m" "-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 this gave me the error message:</p>
  
  <pre><code>"Invalid initial heap size: -Xms512m -Xmx512m
   Could not create the Java virtual machine."
  </code></pre>
  
  <p>Anyone got an idea of how i should increase the heapsize?
  And maybe also give a pointer to where i can find a tool to watch the heapsize.</p>
  
  <p>Thanks in advance.</p>