Maven编报错:No compiler is provided in this environment. Perhaps you are running on a JRE rather a JDK?

报错信息

idea报错No compiler is provided in this environment. Perhaps you are running on a JRE rather a JDK?

解决方式

方式1.pom.xml里面配置指定JDK路径

      
        org.apache.maven.plugins
        maven-compiler-plugin
        
          true
          
          
            C:\Program Files\Java\jdk1.8.0_231\bin\javac.exe
          
        
      

方式2.检查是否JDK环境变量配置正确。高版本的JDK安装会自动配置JDK环境变量,不要因为这个就不去配置,重新配置一次环境变量(踩坑)

你可能感兴趣的:(日常解决错误)