• 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: Include external jar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Include external jar


  • Subject: Re: Include external jar
  • From: Felix Franz <email@hidden>
  • Date: Mon, 9 May 2005 15:28:38 +0200

Hi Raheel,

I guess your app is written in Objective-C:

- put your jar as a resource in your app-bundle.
- preferable in a + initialize-method:

// get the Java virtual machine:
NSJavaVirtualMachine* jvm = NSJavaSetupVirtualMachine();

// set the class path:
NSJavaClassesFromPath(
[NSArray arrayWithObject:
[[NSBundle mainBundle] pathForResource: @"foo.jar" ofType: nil]],nil,YES,&jvm);



HTH,

Cheers,

felix




On May 9, 2005, at 7:56 AM, Raheel Ahmad wrote:

I am trying to include an external jar file for some Java library functions that I need to use in my app. If I put the jar file in /Library/Java/Extensions everything works fine but how do I include in my app?
Thanks.
_______________________________________________
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


_______________________________________________ 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
References: 
 >Include external jar (From: Raheel Ahmad <email@hidden>)

  • Prev by Date: Re: plain text and Spotlight
  • Next by Date: Help not working using key equivalent
  • Previous by thread: Include external jar
  • Next by thread: Re:Include external jar
  • Index(es):
    • Date
    • Thread