Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using JNF (Was: Calling Java from native code)



Hi Paul,

On 2 Nov 2009, at 18:53, Paul J. Lucas wrote:

On Oct 30, 2009, at 4:54 PM, Mike Swingler wrote:

The JNF methods that proxy the JNI methods automatically check for Java exceptions, and rethrow Objective-C exceptions. Plain JNI requires that you always check if a Java exception occurred, and then take some appropriate action (and not call into JNI again until the exception is cleared). JNF_COCOA_ENTER() and JNF_COCOA_EXIT() setup and tear down autorelease pools, and catch Objective-C exceptions and re-throw them back up to Java.

How does one link to JNF? Under:

/System/Library/Frameworks/JavaVM.framework/Frameworks/ JavaNativeFoundation.framework


Use
-framework JavaNativeFoundation
for more details see man page for ld command.

Bye,
--
Tomas Hurka   <mailto:email@hidden>
NetBeans Profiler http://profiler.netbeans.org
VisualVM http://visualvm.dev.java.net
Software Engineer, Developer Platforms Group
Sun Microsystems, Praha Czech Republic

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Using JNF (Was: Calling Java from native code) (From: "Paul J. Lucas" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.