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

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

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

    worked fine for me.

    Note - Don't put double quotes over the path as mentioned above. Otherwise when you run

    mvn -version
    

    it will give following error

    Files\java\jdk1.8.0_201\jre""=="" was unexpected at this time.

提交回复
热议问题