命令:/usr/libexec/java_home -V
iMac ~ % /usr/libexec/java_home -V
Matching Java Virtual Machines (1):
1.8.0_212, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home
iMac ~ %
已安装的:
Matching Java Virtual Machines (1):
版本: 1.8.0_212, x86_64: "Java SE 8"
安装路径:/Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home
默认使用的jdk路径:/Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home