Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: a way to set DYLD_LIBRARY path in info.plist?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a way to set DYLD_LIBRARY path in info.plist?



May not be helpful, depending on your situation, but you can point your Info.plist entry at a shell script which will do what you need it to. The downside being that, as far as I know, it will not launch on 10.1 (correct me if I'm wrong here).

-Tim

On Jul 30, 2004, at 3:49 AM, Greg Guerin wrote:

Ken Hawkins <email@hidden> wrote:

the ant jarbundler produced this:
[..extract from list-rejected attachment..]
<key>CFBundleExecutable</key>
<string>JavaApplicationStub</string>
and i modified slightly to get:
[..extract from list-rejected attachment..]
<key>CFBundleExecutable</key>
<string>java_swt</string>

AFAIK, the JavaApplicationStub is not a command, per se, while 'java_swt'
*IS* a command. Not all executables are commands. You cannot just blindly
swap one for the other in Info.plist or an app-bundle and have it work.

As I understand it, 'java_swt' is like the 'java' command, which is a
completely different animal than JavaApplicationStub, though both create a
JVM. However, I could be wrong, since I don't use Eclipse or SWT.

My suggestion is to read the documentation for 'java_swt' very carefully.
I would even go so far as to download Eclipse, look inside its app-bundle,
and follow that as a working example of a SWT app-bundle. If Eclipse is
able to build a valid Mac OS X app-bundle for a SWT program, then it would
seem to be the best reference on how to do so correctly.


[..another extract from list-rejected attachment..]
<key>VMOptions</key>
<string>-Xmx256m -Djava.library.path=$JAVAROOT/
-Xbootclasspath:$JAVAROOT/swt-pi.jar:$JAVAROOT/swt.jar:$JAVAROOT/ swingwt.jar:/Sy
stem/Library/Frameworks/JavaVM.framework/Classes/laf.jar:/System/ Library/Framewo
rks/JavaVM.framework/Classes/classes.jar</string>

That use of -Djava.library.path=... will not work. The VMOptions key is
only for -X options.

To predefine properties, put them in the Properties dictionary.

That one error alone almost certainly explains why your JNI libs aren't
being found.

The contents of Java app-bundles is described here:
<http://developer.apple.com/documentation/Java/Conceptual/ Java141Development/Dep
loyment_Options/chapter_4_section_3.html>

The Info.plist keys are detailed here:
<http://developer.apple.com/documentation/Java/Reference/ Java14JavaDict/KeysValu
es/chapter_3_section_1.html>

which is a page of this more extensive documentation:
<http://developer.apple.com/documentation/Java/Reference/ Java14JavaDict/index.ht
ml>


...in fact eclipse
running on OSX wraps and calls java_swt. my hope was that i was not
going to have to do that.

If you're running a SWT program, then that's almost certainly what you have
to do. But you should do it exactly the same way that Eclipse itself does
it. There are probably smaller examples of working SWT-based app-bundles,
but I don't know what they might be since I don't use Eclipse or SWT.

-- GG
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: a way to set DYLD_LIBRARY path in info.plist? (From: Greg Guerin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.