Re: Catching JNI exception in Objective C
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.