Running ES without java_home?

Where we are deploying ES, it is required to have the JRE automatically update. But the users don't want to have to manually change java_home every time it gets stale.

The deployment is on Windows.

Would it cause any problems if we simply edited the startup bat files to remove the java_home check and change "%JAVA_HOME%\bin\java" to simply "java" so it picks up the latest one?

What if we setup ES as a service?


It needs to be somewhere in your path, so even if you don't list it there it'll need to be in user variables.

java_home needs to be on the path? Or just java.exe?

If the former what's the effect if it's not?