Wednesday, April 8, 2009

Enabling Java 1.6 for Mac OS X

OK, I might be the last Java developer using a Mac to realize this, but apparently Mac OS X 1.5 (Tiger) uses J2SE 5.0 by default, even though Java SE 6 has been available for nearly two years.

I figured this out today while reading Google's instructions on how to create Java applications for App Engine. (Side note: Woot!) The section regarding compatibility with different versions of Java contained this curious sentence:
For developers that don't have easy access to Java 6 (such as developers using Mac OS X), the App Engine SDK is compatible with Java 5.
That was a head-scratcher. I know that Apple's support for Java usually lags Sun's releases for Windows/Solaris/Linux by a few months, but Java 6 was released over two years ago. Surely Apple has caught up by now, right? To the Terminal window!
Hank:~ mtye$ java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

Huh. That can't be right, can it? No, a little poking around on Apple's site reveals that Java SE 6 was pushed out to users with Java for Mac OS X 10.5 Update 1, back in May 2008. So where's my Java 6?

I found a crucial clue here. Apparently, in the /Applications/Utilities/Java directory, there's a Java Preferences application that can be used to determine which Java version is used by default. I fired it up and got this:

Oh, there's Java 6! Right behind the 32-bit version of Java 5, for some reason. Let's fix that with a little drag & drop:

Let's check again:
Hank:~ mtye$ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
Ah, that's much better. I feel so 2007 now!


  1. Thanks a lot. I am impressed that some programs could not find the v1.6

  2. Thanks buddy! I thought, I was doomed but you saved me :)

  3. You said "Mac OS X 1.5 (Tiger) uses J2SE "

    Mac OS X 10.4 is Tiger

    Mac OS X 10.5 is Leopard

    Mac OS X 10.6 is Snow Leopard

    The BIG question is if 10.4 Tiger can run Java 1.6. Do you know?

  4. Thanks. That was VERY helpful. Gotta wonder why mac does that.

  5. extremely bummed to find out i cant run se 6 on my powerbook g4

  6. This didn't work for me, after performing this change in Utilities I still had
    $ java -version
    java version "1.5.0_30"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_30-b03-389-9M3425)
    Java HotSpot(TM) Client VM (build 1.5.0_30-161, mixed mode, sharing)

    I noted that /usr/bin/java was a symlink

    $ ls -ld ` which java `
    lrwxr-xr-x 1 root wheel 74 Jul 16 2011 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

    So I reset it as below

    cd /System/Library/Frameworks/JavaVM.framework/Versions
    sudo mv Current Current.old
    sudo mv CurrentJDK CurrentJDK.old
    sudo ln -s 1.6 CurrentJDK
    sudo ln -s 1.6 Current

    That worked fine.

  7. Good post.You shared very nice information. Thanks for sharing.
    primary school website design

  8. We are offering website and website design for your company website and or your own website.........

    App Buzz

  9. The materials on this site most likely not|will not be} reproduced, distributed, transmitted, cached or in any other case used, except with the prior written permission of Condé Nast. How many TikToks have you ever watched of individuals peeling off their gunky hydrocolloid patches (aka. pimple patches)? Whether your giftee is acne-prone or simply has a morbid fascination with things may be} sort of gross, a pack of Hydro Seal Hydrocolloid Patches can function 카지노 a sensible, affordable, and entertaining current. "What's your skin-care routine?" That's a query you'll be fielding so much when sporting CoverGirl's Skin Milk, which is kind of like a hybrid between a tinted moisturizer and a light-coverage basis. Its delicate pigments create a sheer veil of shade over the pores and skin whereas the aloe vera-packed formula keeps it soothed as can be.

  10. Though you might be} expected to have stronger palms to win, these wild playing cards lessen the burden of getting these palms. An intoxicated video poker participant is more likely to|prone to} make technique mistakes or make wrong card combinations. To beat video poker, or at least of|no much less than} lower the house edge, take your time, slow down and assume. As a poker participant, you already know… nicely, to be a winner want to|you should|you have to} play a few of} palms, nevertheless, video poker is different. If you discover a video poker machine with a payout of over 100%, with a 메리트카지노 great technique, have the ability to|you presumably can} expect to make earnings in the long run|the lengthy term}. Depending on how a lot a hand pays, have the ability to|you presumably can} set up how high or low the house benefit is, because of|as a result of} all permissible video poker playoffs simulate an actual set of cards.