I have specified splash picture in jnlp application
<icon href="starter.png" kind="splash"/>
When I use IE to run the jnlp, the splash window showed up, but my application 开发者_运维百科can't access the splash. I have used the static variable to obtain the instance:
private static SplashScreen splash = SplashScreen.getSplashScreen();
in main(), I first check whether splash is null, and unfortunately, it is null. Then why can I see it for a few seconds? Did Java Web Start window closed it?
If I run application (not jnlp) in Eclipse with vm arguments then I can access the splash screen and update my slow loading process.
How do I access the splash screen using jnlp?
The splash screen as used by web start predates the AWT SplashScreen
API & is not compatible with it.
How do I access the splash screen using jnlp?
It cannot be accessed.
..it looks like I have to pop up a window to show the picture.
I'd say that is the only option.
..But that way there is no way to show transparency with the splash screen at least before Java 7, right?
Correct. Given that..
..I mean, I don't want to use the reflection either.
..well, reaching into Sun(/Oracle) private classes is not necessarily 'reflection', I guess that is your worry, and that worry is well founded. Either give up on a partially transparent splash, or wait for Java 7.
But then, gotta' comment, I've never before seen a semi-transparent splash. If a splash is worth showing, why not show it at full opacity?
精彩评论