简体   繁体   English

在Mac OS X 10.5.8上将Java 1.6设置为默认值

[英]Setting Java 1.6 as the default on Mac OS X 10.5.8

How can I set Java 1.6 to be the default for my MacBook Pro Intel Core 2 Duo with OS X 10.5.8? 如何将Java 1.6设置为OS X 10.5.8的MacBook Pro Intel Core 2 Duo的默认设置? I have installed the latest software update, and dragged the Java SE 6 64-bit choice to the top in the "Java Preferences" application (and even rebooted), but still, on the command line, java -version responds with: 我已经安装了最新的软件更新,并将Java SE 6 64位选项拖到“Java首选项”应用程序的顶部(甚至重新启动),但仍然在命令行上,java -version响应:

java version "1.5.0_24"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_24-b02-357-9M3165)
Java HotSpot(TM) Client VM (build 1.5.0_24-149, mixed mode, sharing)

Any ideas? 有任何想法吗?

There are symbolic link in /System/Library/Frameworks/JavaVM.framework /System/Library/Frameworks/JavaVM.framework中有符号链接

They point to a specific version in the Versions sub folder. 它们指向Versions子文件夹中的特定版本。

I have had these links breaking on occasion. 我偶尔会破坏这些链接。

AFAICT there is a Current link which points to the Current JRE and a CurrentJDK. AFAICT有一个指向当前JRE和CurrentJDK的Current链接。

Verify if all the links are pointing somewhere logical. 验证所有链接是否指向某个逻辑。 Aparently the Java configlet does something but the chains of links gets broken somewhere else. 显然,Java configlet做了一些事情,但链接链在其他地方被破坏了。

Sorry I wish I could be of more help, but it is all rather mysterious to me. 对不起,我希望自己能得到更多帮助,但对我来说这一切都很神秘。 I have always been able to fix it, but it was not pretty. 我一直能够修复它,但它并不漂亮。

对于时间变化:

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/

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

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