0

I'm new to gradle so i was following the following tutorial : https://spring.io/guides/gs/gradle/#scratch

when i run the gradle task i can see that the java tasks are showing after creating a build.gradle with apply plugin: 'java' But when i use the command gradle build i get following error.

FAILURE: Gradle Build failed with an exception *what whent wrong: execution failed for task ':compileJava'. could not find tools.jar *try..

any ideas?

mattias
  • 2,079
  • 3
  • 20
  • 27
Greg
  • 1,690
  • 4
  • 26
  • 52
  • Take a look at [this](http://stackoverflow.com/questions/11345193/gradle-does-not-find-tools-jar). Seems similar to your case. – Vivin Paliath Jun 10 '15 at 19:03

1 Answers1

0

I had the same problem. if you have more than one JRE installed in your machine, copy the tools.jar to more recent JRE1_x.x_xx version under lib directory. My gradle crashed when I update to more recent gradle and more recent java runtime, and I don't know why java leave the older JRE version folder.

  • I don't think this is good advice; the copying jars from one JRE to another seems like a recipe for disaster – beresfordt Nov 24 '15 at 17:29