• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: JNI and bundles...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JNI and bundles...


  • Subject: Re: JNI and bundles...
  • From: "David V. Kocher" <email@hidden>
  • Date: Fri, 18 Nov 2005 15:25:12 +0100

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
  • Follow-Ups:
    • Re: JNI and bundles...
      • From: Chas Spillar <email@hidden>
References: 
 >JNI and bundles... (From: Chas Spillar <email@hidden>)

  • Prev by Date: Re: the right place where put a serial number
  • Next by Date: Tiger-style toolbars
  • Previous by thread: JNI and bundles...
  • Next by thread: Re: JNI and bundles...
  • Index(es):
    • Date
    • Thread