Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR

Maven项目打包时出现以下错误:
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第1张图片
原因是没有配置成jdk目录

解决步骤:
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第2张图片
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第3张图片
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第4张图片
找到本机JDK所在路径,如果不知道,可以win键+R输入cmd,打开输入指令java -verbose查看JDK路径

Finish之后记得勾选jdk
在这里插入图片描述
进入Execution EnvironmentsMaven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第5张图片
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第6张图片
再次打包
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第7张图片
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第8张图片
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第9张图片
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第10张图片
剪切到tomcat下的webpps
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第11张图片
进入bin,找到startup.bat,启动tomcat
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第12张图片
启动成功后输入项目网址
Maven项目打包出现:No compiler is provided in this environment. Perhaps you are running on a JR_第13张图片

你可能感兴趣的:(JAVA,maven,jdk)