How do I fix maven error The JAVA_HOME environment variable is not defined correctly?

后端 未结 19 1072
误落风尘
误落风尘 2021-02-01 01:33

Issue:

I am getting the Maven error \"The JAVA_HOME environment variable is not defined correctly\" when I run through Inno setup batch execution. Howe

19条回答
  •  余生分开走
    2021-02-01 02:25

    Setting JAVA_HOME directory from command line worked for me!

    First:

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

    Or :

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

    Then try:

    mvn -version
    

    to make sure you do not get the same error. :)

提交回复
热议问题