mvn“No compiler is provided in this environment”报错解决方案
整理自No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
我没用Eclipse,故说明以下两种方法,其中,使用方法二(在此之前使用了方法一)后问题已解决。
方法一:设置环境变量JAVA_HOME的值
如图所示

方法二:更新pom.xml文件的值
设置fork为true且说明JDK的路径
<build>
...
    <plugins>
    ...
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <fork>true</fork>
                <executable>C:\Program Files\Java\jdk1.8.0_45\bin\javac.exe</executable>
            </configuration>
        </plugin>
    </plugins>
</build>

 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号