• 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: Java/Objective C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Java/Objective C (From: albert jordan Mobility <email@hidden>)

  • Prev by Date: Re: PackageMaker
  • Next by Date: Re: viewing entities in the debugger
  • Previous by thread: Java/Objective C
  • Next by thread: Code sense not working on 3.2
  • Index(es):
    • Date
    • Thread