I have an existing application that uses the new SplashScreen API added in JDK 6.
I tried to migrate it from a standalone app to a Java Web Start app, and ran into
the following exception:
----
java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.splashscreen)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkLink(SecurityManager.java:818)
at java.lang.Runtime.loadLibrary0(Runtime.java:817)
at java.lang.System.loadLibrary(System.java:1030)
at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:91)
at SSTest.main(SSTest.java:5)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javaws.Launcher.executeApplication(Launcher.java:1205)
at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1151)
at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:998)
at com.sun.javaws.Launcher.run(Launcher.java:105)
at java.lang.Thread.run(Thread.java:619)
----
Since Java Web Start is now using the new SplashScreen API under the hood, I would
expect to be able to add a splash screen to my webstarted app via:
<icon kind="splash" href="splash.png"/>
and then add a progress bar or something similar to that splash screen using the
new JDK 6 APIs. (If my expectation is incorrect, then we should at least return
null from getSplashScreen(); this exception is obviously not the correct behavior.
But I see no reason why the SplashScreen stuff shouldn't work in a Web Start
scenario.)
To reproduce:
1. Place the attached files in the /tmp directory.
2. cd /tmp
3. javaws SSTest.jnlp