How to create a Java application with Cocoa interface?

I need to use the Java API for the project, but since I am not a fan of Java user interfaces and I have a Mac, I want to create my own Cocoa application around Java code. I know that Xcode is used to directly support these kinds of things, but since it no longer does, what is the best way to do this? If that matters, I have Xcode 3.2.5 on Mac OS 10.6.8.

+2
source share
4 answers

Accordingly, it should be possible for Apple tech note to launch the JVM from your native Mac application. This article was originally written in 2006, and since then much has changed with Apple support for Java. However, it seems that this year the article was updated, so maybe it is supported in current versions of the OS? I can't vouch for him, but it seems worth a try.

0
source

You can use any Cocoa API through this Java-Objective-C bridge . Unlike Rococoa, you don't need to create a whole bunch of Java class stubs before you get started. This is a small dynamic wrapper on top of Objective-C that lets you send messages to Cocoa objects.

+3
source

I'm not sure if this is possible with Xcode. However, you can create graphical interfaces using SWT , which uses its own widgets.

However, in fact, I do not find GUI applications in Java, so I do not know if there are any GUI designers who use SWT, although WindowBuilder Pro seems to be for Eclipse .

+1
source

You can call almost any Cocoa API through rococoa , although it will not necessarily be fast or clean.

0
source

Source: https://habr.com/ru/post/1261459/


All Articles