views:

43

answers:

2

Hi, would it be possible to bind a Java application to a Cocoa graphical interface?

I'm working in Eclipse right now, on my mac, and am wondering if Interface Builder could be used to construct a new interface so that I don't have to look at Swing all day.

Any ideas/suggestions? Thanks!

A: 

Check out Rococoa. It's a great Java-Cocoa compatibility layer that's built on top of JNA.

If you don't find what you are looking for in the documentation, try the mailing list. The Rococoa developers are very helpful.

P.S. I'm not a Cocoa/Objective-C expert, but the section on "NIB loading" might be what you're looking for.

Matt Solnit
A: 

Some good (ANCIENT) historical info here (written 2002):

http://cocoadevcentral.com/articles/000024.php

The original Java/Cocoa bridge (since Mac OS X 10.0) became marked deprecated in 10.4, and is considered unusable. The Rococoa answer above is basically your best bet. Just thought I'd chime in with the historical note.

Warren P
In addition, the Java/Cocoa bridge was completely removed from Snow Leopard.
Matt Solnit