• 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: Status of Java Bridge?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Status of Java Bridge?


  • Subject: Re: Status of Java Bridge?
  • From: Dave Thorup <email@hidden>
  • Date: Fri, 30 May 2003 11:39:12 -0600

On 5/30/03 10:58 AM, "Cameron S. Bahan" <email@hidden> wrote:

> While the Obj-C to Java was published (as discussed in the Cocoa Dev
> Central article) worked there was still that issue of the Java to Obj-C
> ... but Java already has a means for that communication. JNI works
> great here. From C I then use other standard methods to get into the
> Obj-C ... guess this is a bit of a work around ... but from what I
> recall it was not that difficult. (Going over some old docs I guess
> there was a problem unregistering the object - but I am sure that is
> not a complicated issue to resolve)

While I think JNI works for some simple things, I don't think it is adequate
for more complex things such as instantiating my Objective-C class, Foo, and
using its methods in Java. In your example you basically have to create a
proxy C/Obj-C file that handles the communication from Java to Obj-C. I may
be wrong here since I'm pretty new to JNI, but I did try it a while back and
I couldn't find any way to instantiate and use an Obj-C class from Java.
(Anyone know how to do this, or if it is possible?)

Apple's bridge, however, allows you to create a new NSArray or NSDictionary
(or whatever else) directly from Java and use all of their methods just as
you would in Obj-C (well, almost exactly like you would in Obj-C). To me it
seems like Apple's bridge is the much easier and developer-friendly way to
go, especially if you have a large Obj-C Framework that you want to access
from Java. We just need some up to date documentation and examples on how
to do it.

____________________________________

Dave Thorup
Software Engineer
email@hidden

www.corda.com
Interactive data driven graphics.
_______________________________________________
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.

References: 
 >Re: Status of Java Bridge? (From: "Cameron S. Bahan" <email@hidden>)

  • Prev by Date: Re: Status of Java Bridge?
  • Next by Date: Re: Status of Java Bridge?
  • Previous by thread: Re: Status of Java Bridge?
  • Next by thread: Unicode - Converting memory to match NSCell -stringvalue?
  • Index(es):
    • Date
    • Thread