install locations for OpenJDK 7...
Mike Swingler
swingler at apple.com
Sun Dec 13 17:12:16 PST 2009
On Dec 13, 2009, at 4:15 PM, Landon Fuller wrote:
> On Dec 13, 2009, at 4:04 PM, Ray Kiddy wrote:
>
>> Is there any interest in packaging the OpenJDK 7 binaries into a real
>> Mac OS X-compatible location? One can put them somewhere under /usr
>> and make sure that /usr/bin/java points to the right version and this
>> is good for server-ish things, but there may be reasons to install the
>> OpenJDK 7 binaries under /System/Library/Frameworks/JavaVM.framework/
>> Versions/. There is a whole other kind of directory structure under
>> there. I believe that if we want to have regular Cocoa applications
>> that use java to use the OpenJDK 7 VM, it would have to be installed
>> in the JavaVM.framework....
>
> It's possible to register a standard VM (installed at any location) with the Mac OS X Java tools such that you can select it as a preferred VM.
>
> I'm not sure if this is documented anywhere -- that's something Mike Swingler (CC'd) probably has more information on.
There is primitive support in Mac OS X 10.6 and Java for Mac OS X 10.5 Update 6 to detect 3rd party JVMs installed in ~/Library/Java/JavaVirtualMachines, and /Library/Java/JavaVirtualMachines. The JVM has to be a bundle, with a Contents/Home/bin directory, a primary executable (usually a symlink to libjava.jnilib or libjava.dylib). It also requires an Info.plist similar to the Apple-provided JVMs, but the current OpenJDK should only advertise itself as being able to run command-line, since Applets, Web Start, and double-clickable apps will not work correctly right now.
If you could provide me with a link to built OpenJDK 7 you are using as a reference, I could provide a set of steps to assemble it into a JDK bundle that would be recognized by Java Preferences and the /usr/libexec/java_home machinery.
Cheers,
Mike Swingler
Java Runtime Engineer
Apple Inc.
More information about the bsd-port-dev
mailing list