How to Revert to Java 1.6 on Mac OS X 10.7.5

前端 未结 3 781
无人共我
无人共我 2020-12-22 21:07

I have the 1.6 installer. I\'ve used it. It does not change my Java installation, nor say there is an older version, but it does complete the installation.

I\'ve bee

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-22 21:53

    I ran into a similar problem. After having installed JDK7, some of my applications no longer worked. I needed to revert back to JDK6, and I did it differently. I noticed that in my /System/Library/Frameworks/JavaVM.framework/Versions/, it showed the following:

    lrwxr-xr-x  1 root  wheel   10 Oct 25 17:01 1.4 -> CurrentJDK
    lrwxr-xr-x  1 root  wheel   10 Oct 25 17:01 1.4.2 -> CurrentJDK
    lrwxr-xr-x  1 root  wheel   10 Oct 25 17:01 1.5 -> CurrentJDK
    lrwxr-xr-x  1 root  wheel   10 Oct 25 17:01 1.5.0 -> CurrentJDK
    lrwxr-xr-x  1 root  wheel   10 Oct 25 17:01 1.6 -> CurrentJDK
    lrwxr-xr-x  1 root  wheel   10 Oct 25 17:01 1.6.0 -> CurrentJDK
    drwxr-xr-x  8 root  wheel  272 Oct 25 18:06 A
    lrwxr-xr-x  1 root  wheel    1 Oct 25 17:01 Current -> A
    lrwxr-xr-x  1 root  wheel   59 Nov 20 21:40 CurrentJDK -> /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/
    

    so I removed the symbolic link CurrentJDK

     sudo rm CurrentJDK
    

    and re-created the symbolic link pointing to JDK6, which is still on my Mac

    sudo ln -s  /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/ CurrentJDK
    

    and that did the trick for me

    java -version
       java version "1.6.0_65"
       Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
       Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
    

提交回复
热议问题