Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
306 views
in Technique[技术] by (71.8m points)

java - getting JAVA_HOME is incorrectly set with hadoop

I just downloaded hadoop and unzipped the file. but when I run hadoop version command from command prompt , I'm getting below error . I double check and JAVA_HOME is set to "C:Program FilesJavajdk1.8.0_45in" which looks ok to me .

C:Usersshri-pc>hadoop version
The system cannot find the path specified.
Error: JAVA_HOME is incorrectly set.
       Please update C:JAVAhadoop-2.6.0confhadoop-env.cmd
'-Xmx512m' is not recognized as an internal or external command,
operable program or batch file.

Output of java -version command is coming properly . Please advice .

C:Usersshri-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)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Issue was with space in JAVA_HOME path . I change the path as below and it started working.

from -

"C:Program FilesJavajdk1.8.0_45in"

to -

"C:PROGRA~1Javajdk1.8.0_45in"

.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...