Error: JAVA_HOME is incorrectly set.
C:\Users\Administrator>call "-Dzookeeper.log.dir=D:\Download\zookeeper-3.4.14\bin\.." "-Dzookeeper.root.logger=INFO,CONSOLE" -cp "D:\Download\zookeeper-3.4.14\bin\..\build\classes;D:\Download\zookeeper-3.4.14\bin\..\build\lib\*;D:\Download\zookeeper-3.4.14\bin\..\*;D:\Download\zookeeper-3.4.14\bin\..\lib\*;D:\Download\zookeeper-3.4.14\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "D:\Download\zookeeper-3.4.14\bin\..\conf\zoo.cfg"
'"-Dzookeeper.log.dir=D:\Download\zookeeper-3.4.14\bin\.."' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
原因:zkEnv.cmd 下的文件初始设置错误
应该为如下
@REM setup java environment variables
if not defined JAVA_HOME (
echo Error: JAVA_HOME is not set.
goto :eof
)
set JAVA_HOME=%JAVA_HOME:"=%
if not exist "%JAVA_HOME%"\bin\java.exe (
echo Error: JAVA_HOME is incorrectly set.
goto :eof
)
REM strip off trailing \ from JAVA_HOME or java does not start
if %JAVA_HOME:~-1% EQU "\" set "JAVA_HOME=%JAVA_HOME:~0,-1%"
set JAVA="%JAVA_HOME%"\bin\java