简体   繁体   中英

Gradle Build failed with an exception following spring tutorial

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM