1. 程式人生 > >MAC ,找maven、JDK的安裝路徑

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() Home :  /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home