• 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: Mixing Cocoa and Cocoa-Java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mixing Cocoa and Cocoa-Java


  • Subject: Re: Mixing Cocoa and Cocoa-Java
  • From: Scott Ellsworth <email@hidden>
  • Date: Wed, 29 Mar 2006 12:58:33 -0800


On Mar 27, 2006, at 9:23 AM, Christopher Hickman wrote:

I don't want to port a java jar to c, or c++ so I was wondering if
Cocoa and Cocoa-Java or Cocoa and Java can be mixed while using
NIBs for interfacing.

Cocoa-java does exist and does work, but Apple has deprecated it and suggested against using it for shipping applications. The preferred way to use a Java library in Cocoa is to use Cocoa/ObjC (or PyObjC or Camel Bones) for your front end and plain-jane JNI to call into the Java routines. As long as they do something substantial enough to cover the 1ms overhead of a JNI call, you should do fine.

Technically, I don't believe the Java Bridge was deprecated, just
feature-locked. They said it won't be gaining any new functionality, but it
will remain working at its current implementation.



The disturbing part comes in the docs here <http:// developer.apple.com/documentation/Cocoa/Conceptual/ LanguageIntegration/index.html>.


"Important: Features added to Cocoa in Mac OS X versions later than 10.4 will not be added to the Cocoa-Java programming interface. Therefore, you should develop Cocoa applications using Objective-C to take advantage of existing and upcoming Cocoa features."

That said, it is a much softer statement than before, and makes it a bit less of a crapshoot to use. I still likely would use either a Cocoa or a Swing front end, and either a Cocoa or a Java backend, with JNI as the primary communication method if I had to cross the barrier.

Scott


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Dragging promised files to finder behaviour question
  • Next by Date: Re: Randomly shuffle my core data dataset?
  • Previous by thread: RE: Mixing Cocoa and Cocoa-Java
  • Next by thread: RE: Moving from Windows
  • Index(es):
    • Date
    • Thread