Closed fujohnwang closed 3 years ago
I trace here which doesn't make sense:
private static AdapterContext createContext() {
if (!Toolkit.getToolkit().getSystemMenu().isSupported()) {
return null;
}
...
https://www.linkedin.com/pulse/using-awt-splash-screen-javafx-osx-bengt-rutisson
I found why, the AWT thing broke it.
I use AWT for system tray ...
Hi, thanks for sharing. Returning null is obviously not so nice there... I'm currently rewriting this mechanism, so hopefully we won't run into situations like this anymore.
You may want to give the latest update a try. Please refer to https://github.com/codecentric/NSMenuFX/issues/36 for detail
Closing this as obsolete as i just published
<dependency>
<groupId>de.jangassen</groupId>
<artifactId>nsmenufx</artifactId>
<version>3.0.0</version>
</dependency>
I am developing under Mac, when I create a simple demo javafx application, it's ok.
when I put same logic code into another javafx application, I failed with exception below:
the code part is:
I debug into the code , found isSupported() returns false and then everything return null.
But it doesn't make sense, and I don't know why. The only difference between these two application is in the latter, I run springboot first and launch javafx second, But I don't think that's culprit for isSupported return false.
any hint?