Could not find java; set JAVA_HOME or ensure java is in PATH


(Hitesh Sharma) #1

The Elastic search stopped working on my system all of a sudden. I was throwing out an error
"could not find java; set JAVA_HOME or ensure java is in PATH"

I have JAVA_HOME set to "C:\Program Files\Java\jdk11.0.1" yet its not able to find out.
My elastic version is 6.5


(Santiago Martinez) #2

Same problem here. I upgraded from 6.3.2 to 6.5 (ubuntu 16.04), and I get this error:

elasticsearch[567]: could not find java; set JAVA_HOME or ensure java is in PATH


(Hitesh Sharma) #3

My research so far suggests that this error is for individual reasons. For me, it turned out a permission issue. My elastic search was in d drive and java was in c. I downloaded .zip of jdk and uncompressed in d drive and set the environment variable to point that location. This solved my problem. You can also check that by running below in command prompt, if you see the same error, probably you too having same reason

java version