ES_JAVA_HOME is not set correctly because of a space in the directory extension

Viewed 151

I am facing an issue while setting up elasticsearch on my windows machine as a service.

error details

C:\Users\Jyoti Prakash\Downloads\MARKVI\elk\elasticsearch\bin
λ elasticsearch-service.bat install
warning: ignoring JAVA_HOME=C:\Program Files\Java\jdk-18.0.1.1; using bundled JDK
Installing service : elasticsearch-service-x64
Using ES_JAVA_HOME : C:\Users\Jyoti Prakash\Downloads\MARKVI\elk\elasticsearch\jdk
'C:\Users\Jyoti' is not recognized as an internal or external command,
operable program or batch file.

ERROR: Failed installing 'elasticsearch-service-x64' service

The issue is in the file extension C:\Users\Jyoti Prakash\Downloads\MARKVI\elk\elasticsearch\jdk there is a space in my name.

What I tried so far: I created a environment variable called ES_JAVA_HOME with the file name, but still not working. And I am trying this with version Of elasticSearch 8.3.0

I have tried one more option, I downloaded 8.2.1 and same thing working fine and able to start the service.

How to solve this? Couldn't find similar post so raising it.

0 Answers
Related