Reputation: 554
I have to use a Java API for a project, but since I'm not a fan of Java UIs and I have a Mac, I want to build a native Cocoa application around the Java code. I know Xcode used to provide direct support for this sort of thing, but since it no longer does, what's the best way to do this? If it matters, I have Xcode 3.2.5 under Mac OS 10.6.8.
Upvotes: 4
Views: 7508
Reputation: 49
You can use any Cocoa API through this Java-Objective-C bridge. Unlike Rococoa, it doesn't require you to generate a whole bunch of Java class stubs before you begin. It is a small dynamic wrapper over the Objective-C runtime that allows you to send messages to Cocoa objects.
Upvotes: 4
Reputation: 48619
You can call almost any Cocoa API through rococoa, though it will not necessarily be fast or clean.
Upvotes: 0
Reputation: 8292
According to this Apple tech note it should be possible to launch a JVM from within your native Mac application. This article was originally written in 2006 and a lot has changed since then with Apple's support for Java. However, it does look like the article was updated this year so perhaps it is still supported in current versions of the OS? I can't vouch for it but it does seem like its worth a try.
Upvotes: 1
Reputation: 88786
I'm not sure it's possible using XCode. However, it is possible to create GUIs using SWT, which uses native widgets.
However, I don't really do GUI apps in Java, so I don't know if there are any GUI designers that use SWT, although it appears that WindowBuilder Pro for Eclipse does.
Upvotes: 1