Java FX Not Working on Mac OS Sierra

Hello,


I've written a JavaFX application on Windows 10 pro. It worked fine.


When I try to run the EXACT same code on my Mac, ( OS Sierra latest version as of March 9), it shows the java coffee cup logo in the dock, but no window comes up. Then, I have to Force Quit the java app.


I have the latest JDK for Mac OS. Is there anything "apple" specific required to run such programs on Mac OS?


Thanks For Your Help!

-Matt

MacBook Pro with Retina display, OS X Yosemite (10.10.4), MacBook Pro 15" @ 2.5GHz 16GB RAM

Posted on Mar 9, 2017 3:38 PM

Reply
1 reply

Mar 15, 2017 5:47 PM in response to Matt_Raj

Replying to my own post,


While this issue is due to Operating System Incompatibility, there is a band-aid solution for this.

Again, the language here is Java, and this is concerned with JavaFX


Instead of using FileDialog to make a new "Open File" dialog box, we have to use FileChooser.

FileDialog is part of java.awt; while FileChooser is part of JavaFX.swing (which is what we want)


This option will enable a window to pop up on Mac OS AND Windows. However, take note that I've still not resolved the issue where even though I use FileChooser's setTitle() method, the title doesn't show up. (It does on windows)


-Matt

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Java FX Not Working on Mac OS Sierra

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.