3

I've installed Hadoop 2.8.0 in Windows 7, following the instllation instructions in github, I set JAVA_HOME and HADOOP_HOME Environment variables correctly, and configured the core-site.xml, mapred-site.xml, hdfs-site.xml, yarn-site.xml, hadoop-env.cmd files as required in the document, my path is

enter image description here

But after all this is done, I am getting the following error in console fter running hdfs namenode –format command

The system cannot find the path specified. Error: JAVA_HOME is incorrectly set. Please update C:\Hadoop-2.8.0\hadoop-2.8.0\etc\hadoop\hadoop-env.cmd '-Dhadoop.security.logger' is not recognized as an internal or external command,

operable program or batch file.

superunknown
  • 85
  • 1
  • 4
  • 12

4 Answers4

2

Can you set the JAVA_HOME in hadoop-env.cmd as

set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_77"

java path is different for each system depending upon 32bit & 64bit. Please choose correct javapath and add quotes.

Hadoop-Guy
  • 126
  • 5
2

If your Jdk folder like C:/Program Files/Java/Jdk_1.8_261 file path contain space so you should move your jdk to the folder that folder name does not contain spaces

1

make sure that your path is between quotation marks i had the same problem cause i forget the to close the quotation mark.

0

Also can try below way:

Sometimes even we set the right path in hadoop-env.cmd still returns the same error.

so we have to follow below steps:

  1. open cmd (command prompt) as a administrator.
  2. create symbolic link with your java path (ex: c:\program\java\jdk1.8)
  3. in your cmd: $mklink /D \java_home "C:\Program\Java\jdk1.8" (Note: after \D please insert space)
  4. now instead of entire path (c:\program\java\jdk1.8) we can use symbolic link
  5. open hadoop-env.cmd (edit) and set JAVA_HOME = \java_home
  6. Finally save and close the file
  7. now again try syntax : $hdfs namenode -format