title: ElasticSearch service failing to start. Cannot find JVM
body: <p>I have a fresh Windows Server 2012 and have installed the ElasticSearch service with <code>service install</code>.  When I try to start it though it fails to start (Exit code 1).</p>
  
  <p>Looking at the logs it can't find the path to the JVM:</p>
  
  <pre><code>[2016-05-25 19:10:22] [info]  [ 1964] Commons Daemon procrun (1.0.15.0 64-bit) started
  [2016-05-25 19:10:22] [info]  [ 1964] Starting service 'elasticsearch-service-x64' ...
  [2016-05-25 19:10:22] [info]  [ 2508] Commons Daemon procrun (1.0.15.0 64-bit) started
  [2016-05-25 19:10:22] [info]  [ 2508] Running 'elasticsearch-service-x64' Service...
  [2016-05-25 19:10:22] [info]  [ 2968] Starting service...
  [2016-05-25 19:10:22] [error] [ 2968] Failed creating java %JAVA_HOME%\jre\bin\server\jvm.dll
  [2016-05-25 19:10:22] [error] [ 2968] The system cannot find the path specified.
  [2016-05-25 19:10:22] [error] [ 2968] ServiceStart returned 1
  [2016-05-25 19:10:22] [error] [ 2968] The system cannot find the path specified.
  [2016-05-25 19:10:22] [info]  [ 2508] Run service finished.
  [2016-05-25 19:10:22] [info]  [ 2508] Commons Daemon procrun finished
  [2016-05-25 19:10:24] [error] [ 1964] Failed to start 'elasticsearch-service-x64' service
  [2016-05-25 19:10:24] [error] [ 1964] The data area passed to a system call is too small.
  [2016-05-25 19:10:24] [info]  [ 1964] Start service finished.
  [2016-05-25 19:10:24] [error] [ 1964] Commons Daemon procrun failed with exit value: 5 (Failed to start service)
  [2016-05-25 19:10:24] [error] [ 1964] The data area passed to a system call is too small.
  </code></pre>
  
  <p>However, the <code>JAVA_HOME</code> variable is set up correctly:</p>
  
  <pre class="lang-none prettyprint-override"><code>C:\elasticsearch-2.3.3\elasticsearch-2.3.3\bin&gt;dir "%JAVA_HOME%\jre\bin\server\"
   Volume in drive C has no label.
   Volume Serial Number is 6F6F-14E6
  
   Directory of C:\Program Files\Java\jdk1.8.0_92\jre\bin\server
  
    05/25/2016  06:22 PM    &lt;DIR&gt;          .
    05/25/2016  06:22 PM    &lt;DIR&gt;          ..
    05/25/2016  06:22 PM        19,136,512 classes.jsa
    05/25/2016  06:21 PM         8,775,712 jvm.dll
    05/25/2016  06:21 PM             1,423 Xusage.txt
                   3 File(s)     27,913,647 bytes
                     2 Dir(s)  121,919,512,576 bytes free
  </code></pre>
  
  <p>I'm running the console as admin.</p>
  
  <p>Any suggestions?</p>