JDK-7099889 : second copy of SingleInstanceService application does not exit after attaching to main app
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2011-10-12
  • Updated: 2013-12-05
  • Resolved: 2011-10-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
7u2Fixed 8 b12Fixed
see http://javafx-jira.kenai.com/browse/RT-17312

Verified on x86 Win 7/ jre 8-b118 promotion

EVALUATION added to final fix: 1. Add comments to launch method and do not check for single instance for import mode. 2. fixed the problem for webstart applet-desc - when error occur, we failed to show error dialog and java process hang around. it's because error panel is not visible.

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().