title: Error occured during initialization of VM, Could not reserve enough space for object heap - Spring Tool Suite?
body: <p>I'm getting the following error when I build a Gradle project, but SpringToolSuite runs fine</p>
  
  <pre><code>Error occured during the initialization of VM
  Could not reserve enough space for object heap
  Error: Could not create Java Virtual Machine
  Error: A fatal exception has occurred. Program will exit.
  </code></pre>
  
  <p>I have 4GB of RAM, My OS is 64-bit and I recently upgraded Java from 1.6 to 1.7</p>
  
  <p>And this is my sts.ini</p>
  
  <pre><code> -startup
  plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
  --launcher.library
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
  -product
  org.springsource.sts.ide
  --launcher.defaultAction
  openFile
  --launcher.XXMaxPermSize
  1024M
  -vmargs
  -Dosgi.requiredJavaVersion=1.5
  -Xms512m
  -Xmx768m
  -XX:MaxPermSize=1024m
  </code></pre>
  
  <p>I've tried all sorts of variations of <code>-Xms</code> and <code>-Xmx</code> and still the same error.</p>