Hadoop on Windows - “Error JAVA_HOME is incorrectly set.”

前端 未结 7 1186
暖寄归人
暖寄归人 2021-01-04 14:24

I\'m trying to get Hadoop running \'Local Mode\' on my Windows machine. I\'ve been using this guide: http://hadoop.apache.org/docs/r1.2.1/single_node_setup.html

When

7条回答
  •  庸人自扰
    2021-01-04 14:49

    like the other answers, your java environment path must not contain space. The solution is as follows:

    1. In the cmd line, charge the directory that contain the jdk (in my case C:\Program Files\Java\jdk1.8.0_73).
    2. 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)
    3. in the file "hadoop-env.cmd", change the line "JAVA_HOME=%JAVA_HOME%" with "JAVA_HOME=C:\PROGRA~1\Java\JDK18~1.0_7".
    4. run again the file "hadoop-env.cmd" and it will work correctly.

提交回复
热议问题