I am working on a Spring STS project using Eclipse and when I try to run my unit tests using Run as > Maven test I have the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile)
on project eshop-sample-spring-legacy: Fatal error compiling: tools.jar not found:
C:\Program Files\Java\jre1.8.0_144\..\lib\tools.jar -> [Help 1]
I have Java 8 update 144 installed and my variable environments set as follow:
JAVA_HOME = C:\Program Files\Java\jdk1.8.0_144
JRE_HOME = C:\Program Files\Java\jdk1.8.0_144\jre
Path = ...;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Program Files\Java\jdk1.8.0_144\jre\bin;...
My C:\Program Files\Java folder contains jdk1.8.0_144 and jre1.8.0_144 installation folders.
In Eclipse I set Windows > Preferences > Java > Installed JREs pointing to C:\Program Files\Java\jdk1.8.0_144\jre.
Can somebody help me? Thanks
Your Windows > Preferences > Java > Installed JREs is pointing to JRE. But tools.jar is not part of the JRE.
So you need to configure your
Windows > Preferences > Java > Installed JREs
to point to
C:\Program Files\Java\jdk1.8.0_144
or where ever you installed your JDK.
Make INSTALLED_JRE point to JDK
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With