java.library.path fix for MacOS X (7145798)

Greg Brown greg.x.brown at
Mon Feb 20 05:31:10 PST 2012

I actually think "JavaVM" is appropriate, since the contents of this dictionary as well as the contents of the JavaVM folder are used to create and launch an instance of a Java Virtual Machine. We're currently using JLI_Launch() to create the VM instance, but we could just as easily be using JNI_CreateJavaVM() (and most likely are, somewhere under the hood).


On Feb 19, 2012, at 12:37 PM, Mike Swingler wrote:

> Sure. Anything except plain "Java" will work for that Info.plist key, technically. "JavaRuntime" is as specific as a descriptor as I've heard so far.
> Regards,
> Mike Swingler
> Apple Inc.
> On Feb 18, 2012, at 2:22 PM, Igor Nekrestyanov wrote:
>> Would "JavaRuntime" work for plist file?
>> -igor
>> On 2/18/12 2:09 PM, Mike Swingler wrote:
>>> Oh. Well, the name just seems a little odd to me, since there isn't actually a Java "VM" in there, per-se. Obviously the one hardcode path for the native library path will have to be changed too (or be derived from the same #define).
>>> That's why I had originally left the directory "Java" and changed the key to "JVMInfo", since it was info to be consumed by the JVM (technically the launcher). Perhaps key should be "JavaAppLauncher" to be clear about who the information is being handed off to.
>>> I just prefer to be pedantically accurate with the labels of these things,
>>> Mike Swingler
>>> Apple Inc.
>>> On Feb 18, 2012, at 12:03 PM, Greg Brown wrote:
>>>> Actually, I changed the directory to JavaVM as well, for consistency with the plist entry. Is there any technical reason not to do that? It did not appear to cause any problems during my testing.
>>>> G
>>>> On Feb 18, 2012, at 12:01 PM, Michael Hall<mik3hall at>  wrote:
>>>>> On Feb 18, 2012, at 10:42 AM, Mike Swingler wrote:
>>>>>> The bundle directory has not been changed to "JavaVM", only the Info.plist key for the dictionary that describes all the Java options. Nothing should be attempting to assemble an (app)/Contents/JavaVM directory.
>>>>> After you asked Greg to change the plist key he posted a updated demo that now shows....
>>>>> ls /Volumes/SwingSet2/
>>>>> Info.plist    MacOS        PlugIns
>>>>> JavaVM        PkgInfo        Resources
>>>>> JavaVM. Something extra got picked up with the plist change maybe?
>>>>> But after you mentioning that I did try just changing the directory manually to 'Java' but that doesn't seem to show launching at all and has this in console...
>>>>> 2/18/12 10:52:08 AM    JavaAppLauncher[611]    Could not enumerate Java directory contents.: (
>>>>>  0   CoreFoundation                      0x00007fff83904784 __exceptionPreprocess + 180
>>>>>  1   libobjc.A.dylib                     0x00007fff82739f03 objc_exception_throw + 45
>>>>>  2   CoreFoundation                      0x00007fff839045a7 +[NSException raise:format:arguments:] + 103
>>>>>  3   CoreFoundation                      0x00007fff83904534 +[NSException raise:format:] + 148
>>>>>  4   JavaAppLauncher                     0x00000001a4b17bd6 launch + 1078
>>>>>  5   JavaAppLauncher                     0x00000001a4b17676 main + 102
>>>>>  6   JavaAppLauncher                     0x00000001a4b17604 start + 52
>>>>> )

More information about the macosx-port-dev mailing list