Reputation: 267
Running: mvn install
Getting this error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-
plugin:2.5.1:compile (default-compile) on project 1: Fatal error
compiling:
tools.jar not found: C:\Program Files\Java\jre1.8.0_131\..\lib\tools.jar ->
[Help 1]
Area of POM file error:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
When I look at C:\Program Files\Java I'm not seeing tools.jar under JRE lib folder. I see it under JDK lib folder
Upvotes: 0
Views: 1658
Reputation: 517
You are using a JRE, please use a JDK compile your code
How to set a java compiler in Netbeans
Upvotes: 2