EDIT: realized this is in the wrong forum
Elastic search service keeps a cached JAVA_HOME value
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\elasticsearch-service-x64\Parameters\Java
There is a Jvm string value which points to for example: C:\Program Files\Java\jdk1.8.0_45\jre\bin\server\jvm.dll
If you uninstall java u45 and update to a newer java, elastic search service stops working because it has an outdated reference.
We should be pointing to the JAVA_HOME environment variable so that we can handle the cases of java being updated.