Most likely, the JAVA_HOME environment variable points to the JDK instead of the JRE. Change the environment variable and restart Eclipse.
aspectj-maven-plugin contains the following:
<profile> <id>standardToolsJar-profile</id> <activation> <activeByDefault>true</activeByDefault> <file> <exists>${java.home}/../lib/tools.jar</exists> </file> </activation> <properties> <toolsjarSystemPath>${java.home}/../lib/tools.jar</toolsjarSystemPath> </properties> </profile> <profile> <id>appleJdkToolsJar-profile</id> <activation> <activeByDefault>false</activeByDefault> <file> <exists>${java.home}/../Classes/classes.jar</exists> </file> </activation> <properties> <toolsjarSystemPath>${java.home}/../Classes/classes.jar</toolsjarSystemPath> </properties> </profile> <profile> <id>java8</id> <activation> <jdk>1.8</jdk> </activation> <properties> <additionalparam>-Xdoclint:none</additionalparam> </properties> </profile>
I think the reason for this is not because activeByDefault does not start, because the activation of the java8 profile is activated. file-> exists condition will not be called due to incorrect $ {java.home}. $ {toolsjarSystemPath} will not be installed, and trying to use it will throw an exception.
source share