osx 10.10.2下java路径

查看当前java版本
$ java -version

java version "1.8.0_25"

Java(TM) SE Runtime Environment (build 1.8.0_25-b17)

Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

$ which java
/usr/bin/java

$ ls -l /usr/bin/java

lrwxr-xr-x  1 root  wheel  74 12 26 10:24 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java


ls -l /System/Library/Frameworks/JavaVM.framework/Versions/

total 64

lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.4 -> CurrentJDK

lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.4.2 -> CurrentJDK

lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.5 -> CurrentJDK

lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.5.0 -> CurrentJDK

lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.6 -> CurrentJDK

lrwxr-xr-x  1 root  wheel   10 12 26 10:24 1.6.0 -> CurrentJDK

drwxr-xr-x  8 root  wheel  272 12 26 14:10 A

lrwxr-xr-x  1 root  wheel    1 12 26 10:24 Current -> A

lrwxr-xr-x  1 root  wheel   59 12 26 10:24 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents


由此可知,当前java所对应的文件是/System/Library/Frameworks/JavaVm.Framework/Vesions/A/Commons/java

 /System/Library/Frameworks/JavaVM.framework/Versions/下的jdk 1.4-1.6的版本,全部指向/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents



欢迎大家访问我的个人网站 萌萌的IT人

你可能感兴趣的:(osx 10.10.2下java路径)