Java 7 for Mac OSX
Henri Gomez
henri.gomez at gmail.com
Wed Feb 22 12:56:26 PST 2012
>> I have MLVM versions of Java I build and plan to install in ~/Library/Java/JavaVirtualMachines
I do it for various OpenJDK 7 (macosx-port, jdku-dev, jdk7u and MLVM)
for months.
>> 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.
I should say OSX mechanism to select a JVM (from Sys Preference or via
settings JAVA_HOME) is the best available today.
It just works fine !
More information about the macosx-port-dev
mailing list