使用 hadoop 错误地设置了JAVA_HOME
我刚刚下载了hadoop并解压缩了文件。但是当我从命令提示符运行hadoop版本命令时,我得到以下错误。我仔细检查并JAVA_HOME设置为“C:\Program Files\Java\jdk1.8.0_45\bin”,这对我来说看起来还不错。
C:\Users\shri-pc>hadoop version
The system cannot find the path specified.
Error: JAVA_HOME is incorrectly set.
Please update C:\JAVA\hadoop-2.6.0\conf\hadoop-env.cmd
'-Xmx512m' is not recognized as an internal or external command,
operable program or batch file.
java -version 命令的输出正确。请指教 。
C:\Users\shri-pc>java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) Client VM (build 25.51-b03, mixed mode)