Maven error :Perhaps you are running on a JRE rather than a JDK?

后端 未结 20 2358
小鲜肉
小鲜肉 2020-11-30 21:32

I\'ve never worked with Maven before and I am following the instructions here. When I run the command

mvn integration-test -Pamp-to-war

It

20条回答
  •  忘掉有多难
    2020-11-30 21:59

    Problem statement = No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    Solution

    Please set the Environment variable like below to solve the issue

    Variable name : JAVA_HOME

    Variable Value : C:\Program Files\Java\jdk1.8.0_202

    Variable name : M2_HOME

    Variable Value : C:\Program Files\apache-maven-3.6.0

    Moreover, Add Java and maven path in "System Variables" like below:

    1. C:\Program Files\Java\jdk1.8.0_202\bin
    2. C:\Program Files\apache-maven-3.6.0\bin

提交回复
热议问题