1
votes
  1. I've installed Java 6 from this location: http://support.apple.com/kb/DL1359

Java SE 6 is at the top of the list in Java preferences.

Yet, when I type in java -version, it gives me : java version "1.5.0_30"

  1. I note that /Library/Java/Home is pointing to /System/Library/Frameworks/JavaVM.Framework/Versions/1.5.0/Home

I also note that there is no corresponding /System/Library/Frameworks/JavaVM.Framework/Versions/1.6.0/Home

Instead /System/Library/Frameworks/JavaVM.Framework/Versions/1.6 and /System/Library/Frameworks/JavaVM.Framework/Versions/1.6.0 are both links pointing to /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents

Why the discrepancy?

  1. I note that /System/Library/Frameworks/JavaVM.Framework/Versions/CurrentJDK points to /System/Library/Frameworks/JavaVM.Framework/Versions/1.5.0

and /System/Library/Frameworks/JavaVM.Framework/Versions/Current points to /System/Library/Frameworks/JavaVM.Framework/Versions/A

What the heck is "A" ?

1
I do not know how it works on MacOS, but you've checked the environment variables?Tarcísio Júnior
JAVA_HOME points to \Library\Java\Home, which is a link pointing to /System/Library/Frameworks/JavaVM.Framework/Versions/1.5.0/Homecs31415
@ring bearer, I checked the link and tried Java Preferences with no luck. java -version still returns 1.5. I even tried disabling 1.5 through Java preferences. java -version still returns 1.5, which leads me to wonder if this utility is doing anything at all.cs31415

1 Answers

2
votes

Just follow the below steps to change the Java version to 1.5:

  1. Open Terminal
  2. Type cd /System/Library/Frameworks/JavaVM.framework/Versions/
  3. Type sudo ln -fhsv 1.5 CurrentJDK

Refer Changing-Java-Version-in-Mac