简体   繁体   English

在Mac OS(SnowLeopard)上切换J2SE版本

[英]Switching J2SE versions on Mac OS (SnowLeopard)

My current JDK on Mac OS (10.6) is set to 1.6 and I'd like to switch to 1.5. 我当前在Mac OS(10.6)上的JDK设置为1.6,我想切换到1.5。

A listing of '/System/Library/Frameworks/JavaVM.framework/Versions/' shows: “ /System/Library/Frameworks/JavaVM.framework/Versions/”的清单显示:

lrwxr-xr-x  1 root  wheel   10 Nov  3 18:34 1.5 -> CurrentJDK
lrwxr-xr-x  1 root  wheel   10 Nov  3 18:34 1.5.0 -> CurrentJDK
lrwxr-xr-x  1 root  wheel    5 Nov  3 18:34 1.6 -> 1.6.0
drwxr-xr-x  8 root  wheel  272 Nov  3 19:54 1.6.0
drwxr-xr-x  9 root  wheel  306 Nov  3 19:54 A
lrwxr-xr-x  1 root  wheel    1 Nov  3 18:34 Current -> A
lrwxr-xr-x  1 root  wheel    3 Nov  3 18:34 CurrentJDK -> 1.6

Aside from attempting to install 1.5 and then change the symlink for 'CurrentJDK' from 1.6 to 1.5, is there anything else that needs to be done? 除了尝试安装1.5,然后将“ CurrentJDK”的符号链接从1.6更改为1.5之外,还需要做其他事情吗?

Do I also need to change what 'Current' is pointing to? 我还需要更改“当前”指的是什么吗? The 'A' directory seems to contain the Headers and the binary executables (javac, jar, etc). “ A”目录似乎包含标题和二进制可执行文件(javac,jar等)。

Will another version of the JDK install a second directory for it's version of the executables (hopefully in a separate directory) or are they independent of the JDK version? JDK的另一个版本是否将为其可执行文件的版本(可能希望在单独的目录中)安装第二个目录,或者它们独立于JDK版本?

FYI: I've run the 'Java Preferences' utility and only Java SE 6 (32 & 64-bit versions) is listed under both 'Java Apple Plugin' and 'Java Applications' 仅供参考:我已经运行了“ Java Preferences”实用程序,并且在“ Java Apple Plugin”和“ Java Applications”下仅列出了Java SE 6(32和64位版本)。

There is no supported means of getting a real 1.5 onto SnowLeopard. 没有任何支持将Snow1.5转换为1.5的方法。 There are ways to make it work if you are brave. 如果您勇敢,有多种方法可以使其正常工作。

See this discussion 查看此讨论

The Guts Of The Matter Are Here 问题的实质在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM