Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin

问题:在使用idea中的配置文件部署项目时,报Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin

(其实就是/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home路径下(有资料说这个是 JRE 的路径)找不到tools.jar, tools.jar是在java JDK路径下)

#!/bin/sh

解决办法:

1.mac(终端)使用如下命令快速找到java jdk路径:/usr/libexec/java_home -V

会显示两个路径:

/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home路径和jdk路径/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home

可以通过桌面前往-前往文件夹JDK路径,将tools.jar复制到/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib


或使用sudo cp命令复制 (注意替换成自己的地址):

sudo cp /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/tools.jar         /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib


————————————————

版权声明:本文为CSDN博主「catecher_NULL972」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/GUO_NULL192/article/details/119649802

你可能感兴趣的:(Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin)