JavaFX Application hang when Toolkit.getDefaultToolkit() called before launch

Anthony Petrov anthony.petrov at oracle.com
Fri May 17 06:35:11 PDT 2013


Hi Davin,

Yes, this is a known issue. If you ultimately have to initialize AWT 
before starting FX, then you should set the javafx.macosx.embedded 
system property to true (e.g. -Djavafx.macosx.embedded=true on the 
command-line).

Another option is to upgrade to FX8 where this issue is resolved.

--
best regards,
Anthony

On 05/17/2013 05:04 PM, Davin McCall wrote:
> Hi,
>
> I have come across a bug when trying to run some JavaFX code. What it
> boils down to is that the javafx.application.Application's
> launch(String...) method hangs if Toolkit.getDefaultToolkit() is called
> previously.
>
> Roughly:
>
>      public static void main(String[] args)
>      {
>          Toolkit toolkit = Toolkit.getDefaultToolkit();
>          launch(args);
>      }
>
> ... is enough to cause the problem. The launch method hangs and the
> application's start(Stage) method doesn't get called. I have a complete
> test case (36 lines of code) if anyone is interested.
>
> Is this a known bug? Should I file a bug report?
>
> Thanks
>
> Davin
>


More information about the macosx-port-dev mailing list