• 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: Catching JNI exception in Objective C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Catching JNI exception in Objective C


  • Subject: Re: Catching JNI exception in Objective C
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 28 Nov 2003 21:57:19 -0600

Rather than using JNI, why not use Cocoa-Java and let that do all the hard work? Cocoa-Java is easy to integrate with Objective-C Cocoa.

In particular, using the Java Bridge you don't actually need to use low-level JNI just to instantiate some Java objects and send some messages to them.

Here's an article on Cocoa Dev Central about the Java Bridge:

http://cocoadevcentral.com/articles/000024.php

It will even automatically convert Java exceptions into Objective-C exceptions for you!

Also, it looks like you're targeting Panther (since you're using the Panther-only -setObject:forKey: rather than -takeValue:forKey:). Since you only need to run on Panther, you should probably start using the new Objective-C exception handling and synchronization support. It's much nicer (in my opinion anyway) than the old macro-based mechanism.

-- Chris

--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Setting contents of NSTextField to NSCalendarDate
  • Next by Date: copying nsstrings
  • Previous by thread: Catching JNI exception in Objective C
  • Next by thread: NSControllers and App Design
  • Index(es):
    • Date
    • Thread