title: JVM run time memory / net beans run time memory /JVM run time memory with arguments (VTD-Parser)
body: <p>I am parsing a file which is around  <code>600MB</code> in size.</p>
  
  <p>Below is memory usage when the file runs</p>
  
  <p>1] When running from Netbeans with <code>-Xms1g</code> runtime JVM arguments
     it takes around <code>1.03GB memory</code> (checked from Task Manager)</p>
  
  <p>2] When I directly ran <code>JAR</code> it took maximum of <code>1.34GB</code> (checked from Task Manager) and threw <code>java outofmemory exception</code> (I have set my JVM Runtime parameters with <code>-Xms2048M</code> also tried with <code>-Xms1g</code>)</p>
  
  <p>3] When I run from cmd with JVM arguments <code>-Xms1g</code> it takes <code>1.03GB</code> memory and gives the proper output.</p>
  
  <p>Question : 
  My JVM run time parameters are set to run on 2gb memory (tried 1gb too) why does it throw <code>outofmemory</code> even though it gives proper output when the memory is specifically given in the cmd command? </p>
  
  <p><img src="https://i.stack.imgur.com/ILT4S.png" alt="enter image description here"></p>