java- OutOfMemoryError with -Xms1000M -Xmx4000M -mx1000m
<p>Using: -Xms1000M -Xmx4000M -mx1000m
I still get a java.lang.OutOfMemoryError: Java heap space</p>

<p>If I try to increase any of these numbers, I get the following JVM error:</p>

<blockquote>
  <p>Error occurred during initialization of VM</p>
  
  <p>Could not reserve enough space for object heap</p>
  
  <p>Could not create the Java virtual machine.</p>
</blockquote>

<p>How can I solve this OutOfMemoryError problem?
(even if I need to cache memory on disk)</p>
