title: Eclipse error: 'Failed to create the Java Virtual Machine'
body: <p>I am getting this error message when I start Eclipse Helios on Windows 7:</p>
  
  <blockquote>
    <p>Failed to create the Java Virtual Machine</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/YYgjc.png" alt="Enter image description here"></p>
  
  <p>My eclipse.ini looks as follows:</p>
  
  <pre><code>-startup
  plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
  -vm
  P:\Programs\jdk1.6\bin
  --launcher.library
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
  -product
  org.eclipse.epp.package.jee.product
  --launcher.defaultAction
  openFile
  -showsplash
  org.eclipse.platform
  --launcher.XXMaxPermSize
  512m
  --launcher.defaultAction
  openFile
  -vmargs
  -Dosgi.requiredJavaVersion=1.5
  -Xms120m
  -Xmn100m
  -Xmx1024m
  </code></pre>
  
  <p>My JAVA_HOME is correctly set as far as I can tell. How can I fix this?</p>
  
  <h2>Things I have tried so far:</h2>
  
  <ol>
  <li>Adding the full path to javaw.exe
  <code>-vm
  P:\Programs\jdk1.6\bin\\bin\javaw.exe</code></li>
  <li>Removing the <code>-vm</code> option altogether</li>
  <li>Removing <code>--launcher.XXMaxPermSize</code> fixes the issue, but it causes permgen errors</li>
  <li>Removing the value <code>512</code> of <code>--launcher.XXMaxPermSize</code> fixes the issue, but it causes permgen errors</li>
  <li>Reducing <code>-Xmx</code> to <code>512m</code> also fixes the issue.</li>
  </ol>
  
  <p>Why can I not use '1024m' for '-Xmx' and '--launcher.XXMaxPermSize'?</p>