如何访问JNLP中指定的启动画面?
我在 jnlp 应用程序中指定了启动画面
<icon href="starter.png" kind="splash"/>
当我使用 IE 运行 jnlp 时,启动画面出现,但我的应用程序无法访问启动画面。我使用了静态变量来获取实例:
private static SplashScreen splash = SplashScreen.getSplashScreen();
在main()中,我首先检查splash是否为null,不幸的是,它为null。那为什么我能看到几秒钟呢? Java Web Start 窗口是否已关闭?
如果我使用 vm 参数在 Eclipse 中运行应用程序(不是 jnlp),那么我可以访问启动屏幕并更新我的缓慢加载过程。
如何使用 jnlp 访问启动屏幕?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Web Start 使用的启动屏幕早于 AWT
SplashScreen
API 和 AWTSplashScreen
API 的出现。与其不兼容。无法访问它。
我想说这是唯一的选择。
正确的。鉴于..
..好吧,接触 Sun(/Oracle) 私有类不一定是“反思”,我想这就是您的担忧,而且这种担忧是有根据的。要么放弃部分透明的飞溅,要么等待 Java 7。
但是,必须评论一下,我之前从未见过半透明的飞溅。如果飞溅值得显示,为什么不以完全不透明的方式显示它?
The splash screen as used by web start predates the AWT
SplashScreen
API & is not compatible with it.It cannot be accessed.
I'd say that is the only option.
Correct. Given that..
..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?