No compiler is provided in this environment. Perhaps you are runningon a JRE

引用地址:https://blog.csdn.net/qq_36057860/article/details/115270364
用idea中终端执行mvn clean install命令,出现No compiler is provided in this environment. Perhaps you are running on a JRE错误
error

将你的pom.xml 文件修改

<build>
        <plugins>
            <plugin>
            <!--提供打包(将应用打包成可执行的jar包)-->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
            <!-- 指定maven编译的jdk版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <verbose>true</verbose>
                    <fork>true</fork>
                    <!--你的jdk地址-->
                    <executable>D:/Java/jdk1.8.0_201/bin/javac</executable>
                </configuration>
            </plugin>
        </plugins>
   </build>

猜你喜欢

转载自blog.csdn.net/zhuweideng/article/details/123171446