Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_151 contains a valid JDK installation

后端 未结 16 2184
天命终不由人
天命终不由人 2020-12-01 02:50

Even though I manually configured JDK project structure file/Project structure it still shows this error FAILURE: Build failed with an exception.

`What went wrong:

相关标签:
16条回答
  • 2020-12-01 03:10

    In Eclipse

    Right click Project --> Java Build Path --> Libraries

    1. Remove the JRE
    2. Click on Add Library --> JRE System Library -->Next -->Alternate JRE --> installed JRE --> Add JDK and select and Apply
    0 讨论(0)
  • 2020-12-01 03:13

    for tools.jar is in C:\Program Files\Java\jdk1.8.0_201\lib. I changed installed jre in eclipse. Windows->Preferences->Java->installed JREs and make default jre to point to where your jdk is.

    0 讨论(0)
  • 2020-12-01 03:18

    you have to added jdk path org.gradle.java.home=C:\Program Files\Java\jdk1.8.0_102 to gradle.properties make sure you write your jdk version which installed in you system.

    0 讨论(0)
  • 2020-12-01 03:19

    Just had this happen to me.

    Apparently Java's automatic updater installed and configured a new version of the JRE for me, while leaving the old JDK intact. So even though I did have a JDK, it didn't match the currently "active" JRE, which was causing the error.

    Download a matching version of the JDK to the JRE you currently have installed, (In OP's case 151) That should do the trick.

    0 讨论(0)
提交回复
热议问题