I'm having a "JAVA_HOME is incorrectly set" error when launching Zookeeper on windows with zkServer.cmd while it is correctly set!
When I issue %JAVA_HOME%
I got C:\Program Files\Java\jdk1.7.0_45
which is the correct directory of the java instalation.
I suspect the problem is due to the space in program files, as when I issue %JAVA_HOME%\bin\java.exe
(the command used in zkEnv.cmd) I got:
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
How I can fix this?
Quote the path.
"%JAVA_HOME%\bin\java.exe"
in my environment i setted to:
JAVA_HOME=C:\Progra~1\Java\jdk1.8.0_65
Note for Windows users on 64-bit systems
Progra~1 = 'Program Files'
Progra~2 = 'Program Files(x86)'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With