Re: JNI and bundles...
Re: JNI and bundles...
- Subject: Re: JNI and bundles...
- From: Chas Spillar <email@hidden>
- Date: Fri, 18 Nov 2005 10:21:06 -0800
- Thread-topic: JNI and bundles...
Thank you David...
That worked perfectly. I thought I had tried this, but using your code
exactly worked perfectly...
Thank you,
Chas.
> From: "David V. Kocher" <email@hidden>
> Date: Fri, 18 Nov 2005 15:25:12 +0100
> To: Chas Spillar <email@hidden>
> Cc: Cocoa Dev List <email@hidden>
> Subject: Re: JNI and bundles...
>
> Load the library using the following code snippet.
>
> static {
> try {
> NSBundle bundle = NSBundle.mainBundle();
> String lib = bundle.resourcePath() + "/Java/" +
> "library.jnilib";
> log.info("Locating library.jnilib at '" + lib + "'");
> System.load(lib);
> }
> catch (UnsatisfiedLinkError e) {
> log.error("Could not load the library.jnilib library:" +
> e.getMessage());
> }
> }
>
> ~dk
>
> On 16.11.2005, at 19:47, Chas Spillar wrote:
>
>> Question about jnilib's:
>>
>> I have a application with a jnilib which works fine if I put this
>> library in
>> the /Library/Java/Extensions folder or run the application through
>> XCode.
>> However, I would like to put it in the application bundle in
>> Contents/Resources/Java.
>>
>> Unfortunately, I am unable to get it to work in this location. I
>> have set
>> NSNeedsJava and indicated the Java root as Contents/Resources/Java and
>> listed the library in the info.plist. With this setup, it works in
>> XCode
>> but does not work when run independently (unless I move the library to
>> /Library/Java/Extensions).
>>
>> Any help anyone could provide would be appreciated.
>>
>> Thank you,
>>
>> Chas.
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Cocoa-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> 40cyberduck.ch
>>
>> This email sent to email@hidden
>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden