• 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: Wrapping Java in ObjC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wrapping Java in ObjC


  • Subject: Re: Wrapping Java in ObjC
  • From: email@hidden
  • Date: Tue, 5 Feb 2002 12:16:13 -0800

I'm interested in wrapping some pure (i.e. non-Cocoa) Java code,
including drawing, in an Obj-C Cocoa front-end. I'd like to have an
ObjC view class that delegates its drawing to a Java class somehow.
Any advice? Are there any examples on this sort of thing?

Implementing Java classes into an ObjC-app is no problem (see my article
on cocoadevcentral, Java section). Drawing is another problem, since you
might want to use AWT or Swing. Maybe you have to use the framework for
embedding Java applets into browsers (JavaEmbedding.framework).

The cocoadevcentral article was very useful, thanks!
The one question remaining is about a bizarre side effect observed on 10.1.2 when I was trying to get this working. I found that simply calling NSClassFromString on a particular Java class, without doing any other Java stuff (not even instantiating the class I had gotten a reference to) caused very odd side effects in the user interface. The menus changed from those specified in my nib to what appeared to be a set of "standard" menus, the Quit menu item no longer worked (90% of the time, not 100%), and the app's window would no longer come fully key. Simply commenting out the NSClassFromString call made all these side effects go away.
Does this sound familiar to anybody?

Ben Haller
Stick Software
_______________________________________________
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.

  • Prev by Date: Re: Abstract objects (Newbie)
  • Next by Date: Re: Localization and international preferences
  • Previous by thread: Wrapping Java in ObjC
  • Next by thread: Mach-O Speed
  • Index(es):
    • Date
    • Thread