Tag Archives: Could not find tools.jar when build gradle project

Could not find tools.jar when build gradle project

Why are there a series of technical challenges behind “OMG buy it”>>>

Reference website: https://stackoverflow.com/questions/45456210/could-not-find-tools-jar-when-build-gradle-project

Implementation:

gradlew.bat clean build -x test

Error message:

Parallel execution with configuration on demand is an incubating feature.
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not find tools.jar. Please check that D:\Java\jre contains a valid JDK installation.

solution:

Create a new gradle. Properties in the root directory and add a line to it

org.gradle.java.home=C:/path/to/your/jdk