title: Java heap space Xmx Xms parameters ignored
body: <p>I have a .JAR that apparently uses up too much memory, and throws an exception "Java heap space" (or something similar).</p>
  
  <p>So I tried running the .JAR via the CMD like this:</p>
  
  <pre><code>C:\MyFolder&gt;javaw -jar MyJar.jar -Xms64m -Xmx128m
  </code></pre>
  
  <p>That did not solve the problem. Same error.
  Now, when I checked the Processes tab in the windows task manager, I noticed that the process of my jar has a lot less memory than what i asked for (same as running it without the parameters).</p>
  
  <p>Why is it ignoring the parameters?</p>
  
  <p>Also, I think the exception is thrown around the time the process reaches 100mb of memory usage. Is it possible that the GC is trying to free up the memory and that's what causes the problem? Is there any parameter I can set for the GC to prevent that?</p>
  
  <p>Thanks, Malki :)</p>