Bug - Elastic search service keeps a cached JAVA_HOME value – updating java causes error Elasticsearch

Hey guys,

There is an issue with elasticsearch-service if we update Java and we do not reinstall the elasticsearch-service.

In this key:
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.

Thank you for bringing this to our attention. Would you mind filing an issue on GitHub as that's where we track and address issues like this? If not, I'm happy to open the issue for you.

No problem! Issue has been filed

No problem! Issue has been filed

I see the issue. Thank you!