Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Recent JavaForMacOSX10.5Update4 and Java 6 selection issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recent JavaForMacOSX10.5Update4 and Java 6 selection issues



Java Preferences does not change any symlinks. Do not look at the symlinks. The symlinks are a lie. :-)

The /usr/bin Java tools, and now the /usr/libexec/java_home tool all read a per-user, per-machine preference set by the Java Preferences application. The /usr/bin tools will exec the appropriately named tool of the top item in Java Preferences, and /usr/libexec/java_home will tell you the top $JAVA_HOME from Java Preferences that matches your provided criteria.

The hope is that by using /usr/libexec/java_home, you will never have to hardcode a path into /System ever again.

Mike Swingler
Java Runtime Engineer
Apple Inc.

On Jun 17, 2009, at 2:12 PM, Toli Kuznets wrote:

Mike,

Thanks for the quick reply.

Can you explain (or point me to somewhere) how the new java_home and
the GUI "Java Preferences" tools interact?
My /System/Library/Frameworks/JavaVM.framework/Versions still has
Current and CurrentJDK linking to 1.5, but "java -version" comes back
as 1.6 on command line now...

just trying to see how everything interacts now.

thanks

On Wed, Jun 17, 2009 at 2:01 PM, Mike Swingler<email@hidden> wrote:
On Jun 17, 2009, at 1:55 PM, Umberto Zappia wrote:

Hello Mike,
how would you use the /usr/libexec/java_home tool?


In your .bashrc, .tcshrc, .zshrc, etc, you would set $JAVA_HOME

JAVA_HOME=`/usr/libexec/java_home`

See the "java_home" man page for more information.

Cheers,
Mike Swingler
Java Runtime Engineer
Apple Inc.




-- Toli Kuznets http://www.marketcetera.com: Open-Source Trading Platform download.run.trade.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Recent JavaForMacOSX10.5Update4 and Java 6 selection issues (From: Toli Kuznets <email@hidden>)
 >Re: Recent JavaForMacOSX10.5Update4 and Java 6 selection issues (From: Mike Swingler <email@hidden>)
 >Re: Recent JavaForMacOSX10.5Update4 and Java 6 selection issues (From: Mike Swingler <email@hidden>)
 >Re: Recent JavaForMacOSX10.5Update4 and Java 6 selection issues (From: Toli Kuznets <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.