linux上输入mvn package后显示No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

问题截图:

pom.xml 中添加javac路径,如果不能使用centos自带的
随便找一个地方重新解压一个jdk.gz就行,不需要安装,不用配环境变量。

             <plugin>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>3.1</version>
              <configuration>
                    <fork>true</fork>
                    <executable>
                        /prod/test/ops/other/javapath/jdk-13.0.2\bin\javac
                    </executable>
               </configuration>
	</plugin>
posted @ 2020-10-27 09:00  gsfs  阅读(863)  评论(0编辑  收藏  举报