Re: Java/Objective C
Re: Java/Objective C
- Subject: Re: Java/Objective C
- From: Mike Swingler <email@hidden>
- Date: Sun, 13 Sep 2009 01:03:18 -0700
On Sep 12, 2009, at 10:00 PM, albert jordan Mobility wrote:
Can someone point me to a sample code for a "hello world" type
application that mixes Java and Objective C? In particular an
application that follows the MVC pattern, and uses Java classes for
the model component.
The "JNI Library" example in Xcode 3.2 in Snow Leopard bridges between
Cocoa and Java objects via JNI. As written, it outright converts
Foundation objects to Java objects and uses a Java UI, however it
should be a good demonstration how interface with Java at a higher
level than pure C.
The "simpleJavaLauncher" project is a (somewhat tedious) example of
how to instantiate a Java VM within a native process:
<http://developer.apple.com/mac/library/samplecode/simpleJavaLauncher/listing3.html
>
And the JNI tutorial is another helpful guide, especially in the
matters of which UI toolkit uses which threads, and how to get work on
to the most appropriate event queue:
<http://developer.apple.com/mac/library/technotes/tn2005/tn2147.html>
Best of luck,
Mike Swingler
Java Runtime Engineer
Apple Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden