backport JavaAppLauncher from Fireapp