getting JAVA_HOME is incorrectly set with hadoop

前端 未结 6 1530
灰色年华
灰色年华 2020-12-14 03:48

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

相关标签:
6条回答
  • 2020-12-14 04:00

    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
    
    0 讨论(0)
  • 2020-12-14 04:04

    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"
    
    0 讨论(0)
  • 2020-12-14 04:04

    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"

    .

    0 讨论(0)
  • 2020-12-14 04:14

    Try changing the path from

    C:\Program Files\Java\jdk1.8.0_45

    to

    C:\PROGRA~1\Java\jdk1.8.0_45.

    0 讨论(0)
  • 2020-12-14 04:18

    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/

    0 讨论(0)
  • 2020-12-14 04:19

    If your JAVA_HOME is Program Files then change it to PROGRA~1 in JAVA_HOME environment variable.

    0 讨论(0)
提交回复
热议问题