Maven can't compile java 1.8

后端 未结 8 1428
旧巷少年郎
旧巷少年郎 2021-02-04 03:39

I\'m trying to use maven to build a jar but I keep getting the error

ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile 
(d         


        
8条回答
  •  面向向阳花
    2021-02-04 04:08

    Maven relies on the JAVA_HOME environment variable being set. Set it according to your OS and re-run your build.

    Edit: Use export to set the variable.

    export JAVA_HOME=/path/to/java
    

提交回复
热议问题