Enable Java SE 6 on 64-bit Leopard

 

Strangely enough, I have three classes this semester that focus on Java development.  One of which suggests 1.6 development and I found it strange that Apple didn’t provide the Java 1.6 release on Leopard.

Turns out that if you absolutely need Java 1.6 (to use Limewire, for example), it is most likely already installed on your Mac, just not being used by default.  To set it as the default, open Java Preferences in Applications -> Utilities -> Java and drag Java SE 6.0 to the top of each table shown.  That’s it.

Of note, Apple has only release Java SE 6.0 for 64 Intel Macs.  So if you have a Core Duo Mac or earlier, you are stuck with Java SE 5.0 and earlier.

For those having trouble setting Java SE 6 as the default VM on their Intel Mac, see the comments below for a user’s trick. Involves the Terminal and I guarantee nothing.

picture-1

Comments (11) Leave a Comment
  1. Mark Hughes March 11th, 2009 at 02:54 | #1

    Do NOT set Java 6 to be the default, if you plan to run Eclipse or any other SWT-based app; they are not 64-bit compatible.

    The best solution I’ve found is to leave Java 5 as default, and set JAVA_HOME and PATH to Java 6 in Terminal, and set the compiler/runtime in Eclipse to Java 6.

  2. Mark Townsend March 12th, 2009 at 12:54 | #2

    How do you get the 64-bit version of Java 6? I have a Intel Core 2 Duo iMac with Leopard 10.5.6.

  3. Matt March 12th, 2009 at 15:56 | #3

    @Mark Hughes

    Thanks for the tip, I was unaware of the problem.

    @Mark Townsend

    Apple released SE 6 back in April of 2008. There have been two security releases since then. To check if you have these installed on Leopard, open Software Update from System Preferences and click on the Installed Updates tab. You should see “Java for Mac OS X 10.5 Update 1″ from April 2008, as well as Update 2 and Update 3 very recently.

    So short answer, SE 6 is available through Software Update for Intel Leopard users.

  4. peter June 15th, 2009 at 15:14 | #4

    I have a Core 2 Duo Intel iMac. Dragged the 64-bit Java SE 6 to the top as as suggested doesn’t seem to work. When I go to http://www.javatester.org/version.html it shows 1.5.0_16 as the current version.

    Any suggestions on what to do?

  5. Matt June 15th, 2009 at 19:31 | #5

    I’m not really sure on this one, as my system reports the same thing. However, if I open the Terminal ( Applications / Utilities ), the Java runtime reports using version 6 Update 7.

    java -version

  6. Lou June 23rd, 2009 at 09:19 | #6

    I’ve tried to switch to java SE6 on my macbook pro… but although I did change it in Java Preferences, when I “java -version” in my terminal, I always get the same version, no matter what I do in Java Prefs…
    This is the message :

    macbook:~ me$ java -version
    java version "1.5.0_19"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-304)
    Java HotSpot(TM) Client VM (build 1.5.0_19-137, mixed mode, sharing)

  7. Matt June 25th, 2009 at 15:35 | #7

    @Lou

    I’m not sure what to tell you on this one. If I just rearrange the order, the changes take effect immediately for me.

    I do recommend just making sure that you are rearranging the list for the applications, not for the web applications which presumably just deals with the version of java used by web browsers.

    Regardless, unless you have some applications that require Java SE 6 (and there are some, I believe that Limewire is one) this shouldn’t affect you.

  8. Ed June 29th, 2009 at 01:08 | #8

    @Lou

    Same problem here, Java Pref just doesn’t change the Java version… Did you find a solution?

  9. Ed June 29th, 2009 at 01:21 | #9

    @Lou (again)

    Hi, I guess I figured out how to fix the issue setting Java 6 (or any other version):

    cd /System/Library/Frameworks/JavaVM.framework/Versions
    sudo mv CurrentJDK CurrentJDK.orig

    Once you do that, Java Prefs app works as expected… go figure, I’ve never touched that settings and my mac has less than a week.

  10. Paivikki June 29th, 2009 at 11:59 | #10

    Changing the order on Java Preferences window worked like a charm for me! Very happy to see Java SE 6 version on terminal window :-) ….

  11. Matt June 30th, 2009 at 07:35 | #11

    @Ed

    @Lou (again)

    Hi, I guess I figured out how to fix the issue setting Java 6 (or any other version):

    cd /System/Library/Frameworks/JavaVM.framework/Versions
    sudo mv CurrentJDK CurrentJDK.orig

    Once you do that, Java Prefs app works as expected… go figure, I’ve never touched that settings and my mac has less than a week.

    That would certainly do the trick :)

    I also updated the post itself to mention your fix in the comments below.

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">
  1. No trackbacks yet.