1

我做了坏事请帮忙。

我是在:

/System/Library/Frameworks/JavaVM.framework/Versions

我被告知运行以下命令:

sudo ln -fhsv 1.6 CurrentJDK

这把一切都搞砸了:

lrwxr-xr-x   1 root  wheel   10  5 Apr 20:57 1.4 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10  5 Apr 20:57 1.4.2 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10  5 Apr 20:57 1.5 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10  5 Apr 20:57 1.5.0 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10  5 Apr 20:57 1.6 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10  5 Apr 20:57 1.6.0 -> CurrentJDK
drwxr-xr-x   8 root  wheel  272  5 Apr 20:57 A
lrwxr-xr-x   1 root  wheel    1  5 Apr 20:57 Current -> A
lrwxr-xr-x   1 root  wheel    3  6 Apr 00:22 CurrentJDK -> 1.6

我怎样才能恢复它,使它1.6不是符号链接?这是以前的目录。

4

1 回答 1

2

我的目录如下所示:

$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions
total 64
lrwxr-xr-x  1 root  wheel   10 Mar 11 20:37 1.4 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Mar 11 20:37 1.4.2 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Mar 11 20:37 1.5 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Mar 11 20:37 1.5.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Mar 11 20:37 1.6 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Mar 11 20:37 1.6.0 -> CurrentJDK
drwxr-xr-x  8 root  wheel  272 Mar 11 20:37 A
lrwxr-xr-x  1 root  wheel    1 Mar 11 20:37 Current -> A
lrwxr-xr-x  1 root  wheel   59 Mar 11 20:37 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

这样做:

sudo -s
cd /System/Library/Frameworks/JavaVM.framework/Versions
ln -sf /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents 1.6
于 2013-04-05T23:59:55.657 回答