I also encountered the same issue while running the batch file “elasticsearch.bat” in windows 10.
I set JAVA_HOME using below command and it worked for me.
set “JAVA_HOME=C:\Program Files\Java\your_jdk_version”
I also encountered the same issue while running the batch file “elasticsearch.bat” in windows 10.
I set JAVA_HOME using below command and it worked for me.
set “JAVA_HOME=C:\Program Files\Java\your_jdk_version”