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 t
Space in the path will not work. Simply remove any spaces in the path.
In my case it is working with:
set JAVA_HOME=C:\Progra~1\Java\jdk1.8.0_261
Your JAVA_HOME
should not include bin
. Change it from
"C:\Program Files\Java\jdk1.8.0_45\bin"
to
"C:\Program Files\Java\jdk1.8.0_45"
And you can add it to your path (in Windows) like
set "PATH=%PATH%;%JAVA_HOME%\bin"
Issue was with space in JAVA_HOME path . I change the path as below and it started working.
from -
"C:\Program Files\Java\jdk1.8.0_45\bin"
to -
"C:\PROGRA~1\Java\jdk1.8.0_45\bin"
.
Try changing the path from
C:\Program Files\Java\jdk1.8.0_45
to
C:\PROGRA~1\Java\jdk1.8.0_45
.
To me it worked to go to the java path and convert it to the windows short name, as indicated in this picture:
https://www.joe0.com/wp-content/uploads/2017/02/word-image-30.png
from this site:
https://www.joe0.com/2017/02/02/how-to-install-a-hadoop-single-node-cluster-on-windows-10/
If your JAVA_HOME is Program Files
then change it to PROGRA~1
in JAVA_HOME environment variable.