anchor.diff:  )
   "%JAVA_HOME%\bin\java" -version 2>&1 | find "64-Bit" >nul:
   
  -if errorlevel 1 (
  -    set EXECUTABLE=%ES_HOME%\bin\elasticsearch-service-x86.exe
  -    set SERVICE_ID=elasticsearch-service-x86
  -    set ARCH=32-bit
  -) else (
  -    set EXECUTABLE=%ES_HOME%\bin\elasticsearch-service-x64.exe
  -    set SERVICE_ID=elasticsearch-service-x64
  -    set ARCH=64-bit
  -)
  -
  +if errorlevel 1 goto x86
  +set EXECUTABLE=%ES_HOME%\bin\elasticsearch-service-x64.exe
  +set SERVICE_ID=elasticsearch-service-x64
  +set ARCH=64-bit
  +goto checkExe
  +
  +:x86
  +set EXECUTABLE=%ES_HOME%\bin\elasticsearch-service-x86.exe
  +set SERVICE_ID=elasticsearch-service-x86
  +set ARCH=32-bit
  +
  +:checkExe
   if EXIST "%EXECUTABLE%" goto okExe
   echo elasticsearch-service-(x86|x64).exe was not found...
   
   :okExe
   set ES_VERSION=${project.version}
   
  -if "%LOG_DIR%" == "" (
  -set LOG_DIR=%ES_HOME%\logs
  -)
  +if "%LOG_DIR%" == "" set LOG_DIR=%ES_HOME%\logs
   
   if "x%1x" == "xx" goto displayUsage
   set SERVICE_CMD=%1
  
positive.code: REM space for a full heap dump.
  REM JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof
  
  if "%DATA_DIR%" == "" (
  set DATA_DIR=%ES_HOME%\data
  )
  
  if "%WORK_DIR%" == "" (
  set WORK_DIR=%ES_HOME%
  )
  
  if "%CONF_DIR%" == "" (
  set CONF_DIR=%ES_HOME%\config
  )
  
  if "%CONF_FILE%" == "" (
  set CONF_FILE=%CONF_DIR%\elasticsearch.yml
  )
  
  set ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/elasticsearch-%ES_VERSION%.jar;%ES_HOME%/lib/*;%ES_HOME%/lib/sigar/*
  set ES_PARAMS=-Delasticsearch;-Des.path.home="%ES_HOME%";-Des.default.config="%CONF_FILE%";-Des.default.path.home="%ES_HOME%";-Des.default.path.logs="%LOG_DIR%";-Des.default.path.data="%DATA_DIR%";-Des.default.path.work="%WORK_DIR%";-Des.default.path.conf="%CONF_DIR%"
  
negative.code: rem Check JVM server dll first
  set JVM_DLL=%JAVA_HOME%\jre\bin\server\jvm.dll
  
  if exist "%JVM_DLL%" goto foundJVM
  
  set JVM_DLL=%JAVA_HOME%\bin\client\jvm.dll
  
  if exist "%JVM_DLL%" (
  echo Warning: JAVA_HOME points to a JRE and not JDK installation; a client (not a server^) JVM will be used...
  ) else (
  echo JAVA_HOME points to an invalid Java installation (no jvm.dll found in "%JAVA_HOME%"^). Existing...
  