title: How to resolve 'Error occurred during initialization of VM' java?
body: <p>I've connected to a linux-based server using ssh. Recently, I've installed JDK using following command:</p>
  
  <p><code>sudo yum install java-1.6.0-openjdk-devel</code></p>
  
  <p>And jdk installed successfully, but whenever I run command <code>java</code> or <code>javac</code> I get following error:</p>
  
  <pre><code>Error occurred during initialization of VM
  Could not reserve enough space for object heap
  Could not create the Java virtual machine.
  </code></pre>
  
  <p>Even, running command <code>java -version</code>, will bring that error. When I try to give java more space using <code>java -Xmx512m -Xms256m -version</code>, I'll get following error:</p>
  
  <pre><code>*** glibc detected *** java: double free or corruption (!prev): 0x00007fc84400e270 ***
  *** glibc detected *** java: double free or corruption (fasttop): 0x00007fc8440089f0 ***
  #
  Aborted (core dumped)
  </code></pre>
  
  <p>How can I resolve this?</p>
  
  <p>Thanks in advance</p>