EVALUATION
Problem: Use of SingleInstanceService in the JavaFX application does not work as expected.
Once second app is launched it will correctly detect running application and pass new parameters to it.
However, launch process will not exit due to JavaFX Application thread being alive.
Fix: A few changes:
1. SingleInstanceServer thread should be daemon.
2. When we detected single instance is running - currently we just return and didn't perform any shutdown/clean up. Instead, before we exit silently, we should shutdown UI toolkit so javaw process can exit clean.
3. Changed FX toolkit dispose() to call platformtk.exit().
|