Mac 查看本地 JDK 安装目录

使用如下命令:

xxxdeMacBook-Pro$ /usr/libexec/java_home -V

结果显示为:

Matching Java Virtual Machines (3):
    11.0.8, x86_64: "Java SE 11.0.8"    /Library/Java/JavaVirtualMachines/jdk-11.0.8.jdk/Contents/Home
    1.8.0_181, x86_64:  "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
    1.7.0_80, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home

你可能感兴趣的:(Mac 查看本地 JDK 安装目录)