我Mac上目前有以下JAVA版本:
MyMac$ cd /Library/Java/JavaVirtualMachines
$ ls -la
total 0
drwxr-xr-x 4 root wheel 136 17 Oct 11:21 .
drwxrwxr-x 5 root wheel 170 17 Oct 11:21 ..
drwxr-xr-x 3 root wheel 102 14 Jul 22:52 1.6.0.jdk
drwxr-xr-x 3 root wheel 102 17 Oct 11:16 jdk1.7.0_79.jdk
我想要做的是将符号链接更改为指向JDK 7而不是JDK 6:
$cd /System/Library/Frameworks/JavaVM.framework/Versions
$ls -la
drwxr-xr-x 11 root wheel 374 17 Oct 11:21 .
drwxr-xr-x 10 root wheel 340 17 Oct 11:21 ..
lrwxr-xr-x 1 root wheel 10 17 Oct 11:21 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 17 Oct 11:21 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 17 Oct 11:21 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 17 Oct 11:21 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 17 Oct 11:21 1.6 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 17 Oct 11:21 1.6.0 -> CurrentJDK
drwxr-xr-x 8 root wheel 272 17 Oct 11:21 A
lrwxr-xr-x 1 root wheel 1 17 Oct 11:21 Current -> A
lrwxr-xr-x 1 root wheel 52 17 Oct 11:21 CurrentJDK -> /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
不幸的是,我无法删除该链接。我得到了一个操作不允许的错误:
sudo rm CurrentJDK
rm: CurrentJDK: Operation not permitted
有什么想法吗?
谢谢!