Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

error

$ ./gradlew compileJava
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

Correspondence

--Download from http://jdk.java.net/java-se-ri/8-MR3

$ /usr/libexec/java_home -V | grep jdk
1.8.202.08 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
$ mv java-se-8u41-ri/lib/tools.jar "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"
$ sudo chown root:wheel tools.jar

Recommended Posts

Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.
gradle Could not find tools.jar. Error countermeasures