-1

yarn --version

The system cannot find the path specified.
Error: JAVA_HOME is incorrectly set.
       Please update C:\Users\shriy\Downloads\hadoop-3.1.0\etc\hadoop\hadoop-env.cmd
'-Dhadoop.log.dir' is not recognized as an internal or external command,
operable program or batch file.
Majid Hajibaba
  • 3,105
  • 6
  • 23
  • 55
tripp101
  • 9
  • 2

1 Answers1

0

Your java environment path must not contain space. The solution is as follows:

In the cmd line, charge the directory that contain the jdk (in my case C:\Program Files\Java\jdk1.8.0_73). execute the following line "for %I in (.) do echo %~sI" to display the short name of your installed jdk (in my case C:\PROGRA~1\Java\JDK18~1.0_7) in the file "hadoop-env.cmd", change the line "JAVA_HOME=%JAVA_HOME%" with "JAVA_HOME=C:\PROGRA~1\Java\JDK18~1.0_7". run again the file "hadoop-env.cmd" and it will work correctly.

tripp101
  • 9
  • 2