JAVA_HOME is set to an invalid directory:

前端 未结 15 2103
梦毁少年i
梦毁少年i 2020-12-01 04:06

I have set JAVA_HOME in my system C:\\Program Files\\Java\\jdk1.8.0_ 131\\bin; and I am trying to run cordova command( cordova build ) on command p

相关标签:
15条回答
  • 2020-12-01 04:41

    Please remove /bin and even semi colon ; from JAVA_HOME to resolve.

    0 讨论(0)
  • 2020-12-01 04:42

    Remove the \bin, and also remove the ; at the end. After restart the cmd and run.

    0 讨论(0)
  • 2020-12-01 04:42

    You need to set with only C:\Program Files\Java\jdk1.8.0_12.

    And check with using new cmd. It will be updated

    0 讨论(0)
  • 2020-12-01 04:43

    JAVA_HOME should be C:\Program Files\Java\jdk1.8.0_172 don't include semi-colon(;) or bin in path. Any jdk version above 7 will work. Also, you need to re-start the cmd

    0 讨论(0)
  • 2020-12-01 04:45

    i think you need to remove the ';' from the end of the java path.

    0 讨论(0)
  • 2020-12-01 04:45

    First try removing the '\bin' from the path and set the home directory JAVA_HOME as below: JAVA_HOME : C:\Program Files\Java\jdk1.8.0_131

    Second Update System PATH:

    1. In “Environment Variables” window under “System variables” select Path
    2. Click on “Edit…”
    3. In “Edit environment variable” window click “New”
    4. Type in %JAVA_HOME%\bin

    Third restart your docker.

    Refer to the link for setting the java path in windows.

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