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

Michael Hall mik3hall at
Sat Feb 18 14:59:46 PST 2012

On Feb 18, 2012, at 2:03 PM, Greg Brown wrote:

> Is there any technical reason not to do that? It did not appear to cause any problems during my testing.
> G

No reason I'm aware of except matching what this hardcodes...

NSString *GetJavaRoot(NSDictionary *jvmInfoDict) {
    NSObject *javaRoot = [jvmInfoDict objectForKey:@"$JAVAROOT"];
    if (![javaRoot isKindOfClass:[NSString class]]) return @"$APP_PACKAGE/Contents/Java";

Assuming that is what is usually determining what $JAVAROOT value is used.

Like I said, originally I couldn't figure out why my plist $JAVAROOT based changes to classpath weren't showing up and I think this might be it.

Since changing the directory to match this didn't work, there has to be somewhere else that the code expects a set value as well? 

Like I said I still couldn't build to do any of my own testing or might of found that. I wasn't finding jni.h, and stuff like that. Is that the reinstall XCode after the java update, or reinstall the java update after XCode problem?

Good point though that having some JUnit tests that exercise some of these options might be a thought.

More information about the macosx-port-dev mailing list