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

后端 未结 19 1041
误落风尘
误落风尘 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:24

    I was facing the same issue while using mvn clean package command in Windows OS

    C:\eclipse_workspace\my-sparkapp>mvn clean package
    The JAVA_HOME environment variable is not defined correctly
    This environment variable is needed to run this program
    NB: JAVA_HOME should point to a JDK not a JRE
    

    I resolved this issue by deleting JAVA_HOME environment variables from User Variables / System Variables then restart the laptop, then set JAVA_HOME environment variable again.

    Hope it will help you.

提交回复
热议问题