本文主要是介绍Maven项目出现Perhaps you are running on a JRE rather than a JDK?,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、今天在使用springboot进行clean和package出现了错误,maven的错误如下:
Failed to execute goal org.apache.maven.plugins:maven-compiler- plugin:3.1:compile (default-compile) on project TEST-WEB: Compilation failureNo compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
2、他的意思是没有jdk,maven中使用的是jre,所以要使用本地的jdk,
3、打开eclipse,选择Windows–>preferences–>java–>installed jres–>add
4、选择最后一个 点击next
5、选择jdk的安装路径,一定要到内部的jdk目录,不然还是会出现错误。
6、然后确定,并且使用自己本地的jdk,然后在运行就一切正常。
这篇关于Maven项目出现Perhaps you are running on a JRE rather than a JDK?的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!