Maven compilation error when run through command line - Cucumber Maven Project

前端 未结 1 1322
自闭症患者
自闭症患者 2021-01-27 09:52

mvn clean test running from command line says , No Compiler is provided in this environment , perhaps you are running on JRE rather than a JDK.

Selected Installed JRE\'s

1条回答
  •  隐瞒了意图╮
    2021-01-27 10:34

    Assuming windows and your actual directories may vary, make sure :

    1) Your JAVA_HOME environment variable is set to .../jdk1.8/ directory

    2) Your M2_HOME is set to your ../apache-maven-3.... directory

    3) %JAVA_HOME%/bin & %M2_HOME%/bin are in your path

    4) Check this with mvn -version, you should see something like:

    Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
    Maven home: C:\opensource\apache-maven-3.3.9
    Java version: 1.8.0_92, vendor: Oracle Corporation
    Java home: C:\PROGRA~1\Java\jdk1.8.0_92\jre
    Default locale: en_GB, platform encoding: Cp1252
    OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
    

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