JAVA_HOME is not installed correctly when starting Zookeeper on Windows

I have a "JAVA_HOME incorrectly installed" error when starting Zookeeper on Windows with zkServer.cmd while it is correctly installed! When I issue %JAVA_HOME%, I received C:\Program Files\Java\jdk1.7.0_45which is the correct java installation directory.

I suspect that the problem is with the space in the program files, since upon release %JAVA_HOME%\bin\java.exe(the command used in zkEnv.cmd ), I received:

'C:\Program' is not recognized as an internal or external command, operable program or batch file.

How can i fix this?

+4
source share
2 answers

Specify the path.

"% JAVA_HOME%\Bin\java.exe"

+3

. .

[% JAVA_HOME%\bin\java] [ "% JAVA_HOME%\bin\java" ] zkEnv.cmd. .

zkServer.cmd. .

+1

All Articles