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? 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 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
They point to a specific version in the Versions sub folder.
I have had these links breaking on occasion.
AFAICT there is a Current link which points to the Current JRE and a CurrentJDK.
Verify if all the links are pointing somewhere logical. Aparently the Java configlet does something but the chains of links gets broken somewhere else.
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.
For temporal changes:
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
精彩评论