title: Java: Could not reserve enough space for object heap
body: <p>I am trying to allocate 2 gigs of ram to a java application started from a bat file using this line of code:</p>
  
  <pre><code> @echo off
      "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xmx2G -Xms1G -jar craftbukkit-1.2.5-R4.0.jar
      pause
  </code></pre>
  
  <p>When I attempt to run it like this, however, it spits out an error saying:</p>
  
  <pre><code> Error occurred during initialization of VM
      Could not reserve enough space for object heap
      Could not create teh Java virtual machine
      Press any key to continue . . .
  </code></pre>
  
  <p>I currently have 8 gig of ram in my computer and I know I am using a max of 3 gigs at all times(I let the computer sit for the most part just running this server file). I have 2x4gig sticks of ram so I know its not separated out, and I know that I have enough free ram to allocate so why would it not let me? I am able to allocate 1536M(1.5 gigs) and under, but if I jump to 2G's it gives me this error. Any help is appreciated</p>