终端输入:/usr/libexec/java_home -V
Matching Java Virtual Machines (1):
1.8.0_161, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
终端输入:/usr/libexec/java_home -V
Matching Java Virtual Machines (1):
1.8.0_161, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home