JAVA_HOME issues on ELastic search for Windows Server 2012

Hi
I am running into error where elastic search won't start due to JAVA_HOME not being found. I have installed 64 bit JDK and JRE for windows server 2012 R2. I can see that JAVA_HOME and PATH are shown correctly. java-help does work in the elasticsearch bin directly without issues

However running elasticSearch bat gives me following error .

Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME

Running Java_home :
c:\ElasticStack\elasticsearch-5.2.2\bin>echo %JAVA_HOME%
C:\Program Files\Java\jre1.8.0_121\bin

Would appreciate any help around this.

I recommend not using any space in java dirs. Move away from Program Files. Might not be your issue though.

Thanks for the feedback, that resolved the issue, ( uninstalled java, re-installed in directory with no spaces ) and adjusted JAVA_HOME and PATH variables to reflect to new locations.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.