问题:使用maven tomcat:run时,出现错误编译错误导致build失败。
Unable to locate the Javac Compiler in:
C:\Program Files\Java\jre1.8.0_161\..\lib\tools.jarPlease ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
解决办法:将默认的jre路径(c盘)换到jdk的jre路径(d盘)下。
链接:https://blog.csdn.net/wangming1473/article/details/72781679。