I'm a big fan of Java and I want to develop a desktop application for macOS. Is it possible to stick with pure Java for this, or do I need to incorporate some Swift elements to make it work?
4 Answers
If your app needs a user interface, you might want to consider using JavaFX or Swing. I've successfully created several desktop applications in pure Java that run on macOS, as well as other platforms using the JVM.
If you're focusing only on Mac, then I would recommend using Swift. However, if you plan to support other platforms like Windows or Linux, JavaFX is definitely your best bet!
It really depends on what kind of app you're making. If you want access to specific macOS features that Java doesn't cover, or if you want a more native feel (like the new macOS designs), Swift is the way to go. But if you're aiming for a cross-platform app, pure Java can work great. I've made commercial apps using pure Java and Swing, and they look good while fitting into macOS pretty well. Just be aware that making it feel native will require some extra effort with Java's integration classes.
That's good to know! I was worried about going purely Java but sounds like it can work with some care.
You can also look into alternatives like SWT or Eclipse RCP, although they might not be necessary if you're okay with JavaFX or Swing.
Thanks for the advice! I still want to experiment with Java first, but I'll keep Swift in mind if I go Mac-only.