Java 7 for Mac OSX

Mike Swingler swingler at
Wed Feb 22 11:51:55 PST 2012

On Feb 22, 2012, at 11:44 AM, Stephen Bannasch wrote:

> At 11:14 AM -0800 2/22/12, Mike Swingler wrote:
>> As for the /usr/bin Java tools on the command line, we'll get rid of the Java Preferences UI entirely, and always delegate to the highest installed .jdk bundle inside of /Library/Java/JavaVirtualMachines. You will still be able to query for multiple installed versions with /usr/libexec/java_home (just as you can do today).
>> Any thoughts / opinions / concerns about this plan?
>> Mike Swingler
>> Apple Inc.
> How will the jdk bundles I have installed in ~/Library/Java/JavaVirtualMachines be sorted with respect to the ones installed in/Library/Java/JavaVirtualMachines?

They will be scanned as well, and sorted side-by-side with the /Library JVMs as well. I'm sorry, it was my oversight to not mention that that path will be scanned as well.

> I have MLVM versions of Java I build and plan to install in ~/Library/Java/JavaVirtualMachines
> I'd like to be able to easily switch from one to another in the command line for tools running in a specific shell invocation.

You should plan to use /usr/libexec/java_home with some version selecting flags to set your $JAVA_HOME environment variable to swizzle between versions. Or just manually set $JAVA_HOME if you don't want to dynamically discover the path.../usr/libexec/java_home is just a convenience for presenting what is found on the search path of the /usr/bin Java tools.

Mike Swingler
Apple Inc.

More information about the macosx-port-dev mailing list