title: Elasticsearch Could not create the Java Virtual Machine
body: <p>I'm trying to run elasticsearch on windows by following <a href="https://newsinfo-blog.blogspot.pt/2016/05/install-elasticsearch-on-windowwamp.html" rel="nofollow noreferrer">this tutorial</a>.
  When i run bin/elasticsearch.bat i did get this message:</p>
  
  <pre><code>Invalid initial heap size: -Xms${packaging.elasticsearch.heap.min}
  
  Error: Could not create the Java Virtual Machine.
  
  Error: A fatal exception has occurred. Program will exit.
  </code></pre>
  
  <p>I tried inceasing memory from java by setting <a href="http://www.wikihow.com/Increase-Java-Memory-in-Windows-7" rel="nofollow noreferrer">like this</a>.
  Then i removed <code>%JAVA_OPTS%</code> from elasticsearch.bat line:</p>
  
  <blockquote>
    <p>"%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% -cp
    "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" start
    !newparams!</p>
  </blockquote>
  
  <p>Now i get this message:</p>
  
  <pre><code>Error: Could not find or load main class org.elasticsearch.bootstrap.Elasticsearch
  </code></pre>
  
  <p>I'm running java last version jre1.8.0_144 x64 and elastic version 2.4.6.
  In the elasticsearch in wamp tutorial it says </p>
  
  <blockquote>
    <p>Now open 'elasticsearch.bat' file in 'C:\elasticsearch-2.3.2\bin\'
    directory</p>
  </blockquote>
  
  <p>But in the zip files is located in </p>
  
  <blockquote>
    <p>C:\elasticsearch-2.4.6\distribution\src\main\resources\bin</p>
  </blockquote>
  
  <p>Even in 2.3.2 is located in same directory. I don't know if it makes any diference.</p>
  
  <p>I have no ideas what else can i change. Any help would be nice.</p>
  
  <p>Thanks in advance</p>