Not find java in JAVA_HOME or bundled for elasticsearch

D:\ESQELK\elasticsearch-7.2.0-windows-x86_64\elasticsearch-7.2.0\bin>elasticsearch
"could not find java in JAVA_HOME or bundled at D:\ESQELK\elasticsearch-7.2.0-windows-x86_64\elasticsearch-7.2.0\jdk"

and JAVA_HOME is set to C:\Users\mehak\Documents\java-1.8.0-openjdk-1.8.0.232-3.b09.redhat.windows.x86_64

What is the issue. please help!

Does this directory contain a bin directory in which java.exe can be found? I think that's what the process ultimately looks for

Yes, java.exe can be found in C:\Users\mehak\Documents\java-1.8.0-openjdk-1.8.0.232-3.b09.redhat.windows.x86_64\java-1.8.0-openjdk-1.8.0.232-3.b09.redhat.windowsx86_64\bin

I think it is definitely a java issue because of which elasticsearch isnt running. What should be my next approach?

This has an extra directory, java-1.8.0-openjdk-1.8.0.232-3.b09.redhat.windowsx86_64, in which the bin directory is found. In light of this, I think JAVA_HOME should be set to

C:\Users\mehak\Documents\java-1.8.0-openjdk-1.8.0.232-3.b09.redhat.windows.x86_64\java-1.8.0-openjdk-1.8.0.232-3.b09.redhat.windowsx86_64

For example, with PowerShell

[Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\Users\mehak\Documents\java-1.8.0-openjdk-1.8 .0.232-3.b09.redhat.windows.x86_64\java-1.8.0-openjdk-1.8.0.232-3.b09.redhat.windowsx86_64", "Machine")

Then open a new session, and start Elasticsearch.

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