On 3/18/2015 6:46 PM, Sergey Bylokhov wrote:
18.03.15 7:53, Alexander Scherbatiy wrote:
It is possible just call [NSApplicationAWT sharedApplication] on
the main thread because SplashGetScaledImageName() method creates its
own NSAutoreleasePool and does not need to restart the app.
Will our splash screen work in case of JAVA_STARTED_ON_FIRST_THREAD
= true?
No. This is because of the fix JDK-8039926 -spash:<image> can't be
combined with -xStartOnFirstThread since JDK 7
https://bugs.openjdk.java.net/browse/JDK-8039926
Why it doesn't work as this bug was marked as fixed? From review of
this fix I see that splash screen should not work in webstart
applications only, when a swt is used. It seems that normal/hidpi
splash screen should work in this case.
According to the JDK-8039926 review the only way to check SWT
running is using -xStartOnFirstThread system property:
http://mail.openjdk.java.net/pipermail/awt-dev/2014-April/007526.html
---------------------------------------
When running SWT we should not start the main event loop for
splashscreen because it breaks SWT.
The only way understand that in splashscreen code is to check the system
property launcher sets on
the startup. We do the same in awt.m, but we cannot reuse the code
because splash and awt are not
statically linked.
---------------------------------------
Thanks,
Alexandr.
SplashScrean treats JAVA_STARTED_ON_FIRST_THREAD as running with SWT.
I have added the same check to the SplashGetScaledImageName() method.
Thanks,
Alexandr.
17.03.15 4:27, Alexander Scherbatiy wrote:
Hello,
Could you review the fix:
bug: https://bugs.openjdk.java.net/browse/JDK-8075244
webrev: http://cr.openjdk.java.net/~alexsch/8075244/webrev.00
[NSApplicationAWT sharedApplication] call is added for the
application initialization.
Thanks,
Alexandr.