Not without some magic (and this isn't an Eclipse thing, this is just a Java thing) ... As part of your startup, you have to read the JNI file out of the jar and write it to the filesystem and then load that library. This is what Eclipse does, for instance, with SWT. I don't know of any way for System.loadLibrary to load a JNI lib out of a jar file directly.

ms

On Mar 4, 2008, at 12:12 PM, Florijan Stamenkovic wrote:

Mike,

Thanks for the answer... However, what if I need to bundle the JNI with my app, within the jar (so, within the bin output folder)? I am sure this is technically possible because I used to do it with XCode... Is there some way I can do that with Eclipse?

Flor

On Mar 04, 2008, at 12:52, Mike Schrag wrote:

JNI will load out of the working dir (project root usually), / Library/Java/Extensions, or it will look for JNI libraries in the folder specified by the system property "java.library.path", which you should be able to set on your launch config.

ms

On Mar 4, 2008, at 11:46 AM, Florijan Stamenkovic wrote:

Hi all,

Could someone tell me how to add jnilib files to the classpath of a project? Many places in Eclipse insist on jars. I've tried simply putting the file in the root of my source tree, ensured it was there in the root of the bin output, but still it was not detectable within my app.

I'm talking about Werner Randelschofer's Quaqua, specifically, the libquaqua.jnilib file.

Thx,
Flor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to [EMAIL PROTECTED]


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/flor385%40mac.com

This email sent to [EMAIL PROTECTED]



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to