<AWT Dev> [8] Review request for 8005465: [macosx] Evaluate if checking for the -XstartOnFirstThread is still needed in awt.m
Christopher Deckers
chrriis at gmail.com
Fri Jan 11 08:14:56 PST 2013
Hi all,
I don't know if that helps the conversation, but just so nothing gets
omitted...
> If AWT knew SWT was going to run, we could probably not start our own
> event loop. Do we want to support this use-case?
>
I'm asking, because otherwise, i.e. if SWT is always initialized first,
> then no matter where you start AWT (main thread or not), it will run just
> fine re-using the existing SWT's event loop.
>
When AWT embeds SWT (to get the native web browser in a Swing application
for example), it is not uncommon to have the main method in an AWT
Component subclass (generally a JFrame). We had issues in the past where on
Mac this causes AWT to initialize certain stuff while loading the AWT
Component before main() is even invoked. As a workaround we advised users
to avoid placing their main() method (which will perfom the SWT event loop)
in an AWT subclass but I see users stumbling this issue every now and then.
Is this still going to cause problems on Mac? Isn't it going to trigger AWT
loading before SWT can be detected (the use case you described)?
Hope this helps,
-Christopher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20130111/67f52750/attachment.html
More information about the awt-dev
mailing list