美文网首页CWIKIUS
Maven 项目执行的时候提示 JAVA_HOME is not

Maven 项目执行的时候提示 JAVA_HOME is not

作者: HoneyMoose | 来源:发表于2021-08-13 01:22 被阅读0次

提示的错误信息如下:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (attach-javadocs)onproject codebank: MavenReportException: Errorwhilecreating archive: Unable to find javadoc command: The environment variable JAVA_HOMEisnotcorrectlyset. -> [Help1][ERROR][ERROR] To see the full stack trace of the errors, re-run Mavenwiththe -eswitch.[ERROR] Re-run Mavenusingthe -Xswitchto enable full debug logging.[ERROR][ERROR] For more information about the errorsandpossible solutions, please read the following articles:[ERROR] [Help1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

如下图:

问题和解决

上面的提示已经比较清楚了。

你没有在你的环境变量中设置 JAVA_HOME

需要按照上面的设置一个环境变量。

如果你使用的是 IEDA 的话,你需要重启的 IDEA 环境。

如果你使用的是命令行工具的话,你也需要退出后重启。

然后再次进行编译,应该就能解决上面的问题了。

https://www.ossez.com/t/maven-java-home-is-not-correctly-set/13679

相关文章

网友评论

    本文标题:Maven 项目执行的时候提示 JAVA_HOME is not

    本文链接:https://www.haomeiwen.com/subject/imclbltx.html