- 1.8.0_92 をインストールしたのに
[~]$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
- インストール済み JDK の確認
[~]$ /usr/libexec/java_home -V
Matching Java Virtual Machines (5):
1.8.0_92, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home
1.8.0_25, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
1.8.0_25, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
1.8.0, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
1.7.0_51, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
インストールされてるね
- javaコマンドの実体はどうなっているんだろう
[~]$ ls -la /usr/bin/java
lrwxr-xr-x 1 root wheel 74 10 3 2015 /usr/bin/java ->
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
[~]$ ls -la /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
-rwxr-xr-x 1 root wheel 58480 9 17 2015 /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
なんか /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java はシンボリックリンクじゃなくて、振り分けプログラムっぽい、ここいじると不幸なことが起きそう
- jdk1.8.0_45 を削除したらどうなるべ? http://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html#A1096903
[~]$ sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/
- なんかうまく言ったっぽい
[~]$ java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)