dustinkredmond / FXTrayIcon

Tray Icon implementation for JavaFX applications. Say goodbye to using AWT's SystemTray icon, instead use a JavaFX Tray Icon.
MIT License
324 stars 25 forks source link

No system tray support, application exiting. #5

Closed robertmakrytski closed 3 years ago

robertmakrytski commented 3 years ago

I tested on windows 10 vmware and ubuntu 18.xx and have this message. 1)Do you know how many windows 10 have system tray return true? 2)it can be possible implement for java desktop on c++ when it returns false?

dustinkredmond commented 3 years ago

@robertmakrytski, as far as I'm aware, calling FXTrayIcon.isSupported() should always return true on Windows 10 machines.

In Ubuntu, I know on 20.04 (the latest LTS release) FXTrayIcon.isSupported() should return false, as GNOME uses AppIndicator, which the AWT TrayIcon does not support.

FXTrayIcon.isSupported() will also return true on the latest MacOS Big Sur.

I've yet to test other Linux distros, but assuming that they use a desktop environment in which the SystemTray is supported, FXTrayIcon.isSupported() should return true.

In response to question two: 2)it can be possible to implement java desktop on c++ when it returns false? Yes, but this is not currently the goal of FXTrayIcon Another of my projects (NotiFX) aims to do exactly this. The library will determine the OS that it's running on, then call native code using either JNI or the Foreign Linker API available in JDK 16 as an incubator project. This project is still in development and not ready for public use.

robertmakrytski commented 3 years ago

learn this https://github.com/dorkbox/SystemTray i found, but id doesn't work for me too)

dustinkredmond commented 3 years ago

@robertmakrytski I took a quick look at dorkbox/SystemTray. It seems you may need to run your Java application as root (sudo).

I'm going to close this issue for now, as native support is not a long-term goal of FXTrayIcon, but rather NotiFX as I mentioned above.