title: Elasticsearch startup error -- heap size
body: <p>on running </p>
  
  <pre><code>elasticsearch.bat
  </code></pre>
  
  <p>in Command Prompt, </p>
  
  <p>I'm getting the error:</p>
  
  <pre><code>Invalid initial heap size: -Xms${packaging.elastic.heap.min}
  Error: Could not create the Java Virtual Machine.
  Error: A fatal exception has occurred. Program will exit. 
  </code></pre>
  
  <p>The call:</p>
  
  <pre><code>elasticsearch -Xmx1g -Xms1g
  </code></pre>
  
  <p>among some others i tried with different parameters in place of 1GB didn't work either. 
  <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html" rel="nofollow noreferrer">1GB is the default</a> anyways. </p>
  
  <p>I'm running ES for the first time on this machine. This has been working fine 
  till today-- when i invoked ES buy its batch caller </p>
  
  <pre><code>..&gt;bin&gt;elasticsearch.bat
  </code></pre>
  
  <p>it worked fine. </p>
  
  <p>what am i missing?</p>
  
  <p>TIA. </p>
  
  <p>Note: i've see <a href="https://stackoverflow.com/questions/909018/avoiding-initial-memory-heap-size-error">Avoiding Initial Memory Heap Size Error</a>, <a href="https://stackoverflow.com/questions/27128620/elasticsearch-reports-default-heap-memory-size-after-setting-environment-variabl">Elasticsearch reports default heap memory size after setting environment variable</a> among some other relevant discussions. </p>