MAC ,找maven、JDK的安装路径

1.maven的地址

mvn --version

查看里边的地址就是maven的地址

2.JDK

java --version

如果,查不到,查询系统默认的位置

打开终端,执行     /usr/libexec/java_home -V


MacBook-Air:~ eng$ /usr/libexec/java_home -V
Matching Java Virtual Machines (4):
    1.8.0_101, x86_64:  "Java SE 8"     /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
    1.7.0_79, x86_64:   "Java SE 7"     /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
    1.6.0_65-b14-466.1, x86_64: "Java SE 6"     /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-466.1, i386:   "Java SE 6"     /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home



默认JDK1.6(Apple自带JDK)路径:   /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

默认JDK1.7、1.8(Oracle) Home :  /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home






你可能感兴趣的:(Java后台)