JDK-6761053 : Desktop shortcuts for dragged applets from HTTPS servers do not relaunch and can not be customized
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10,6u11
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,windows
  • CPU: generic,x86
  • Submitted: 2008-10-18
  • Updated: 2010-09-08
  • Resolved: 2008-10-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u11 b03Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
A user pointed out on the java.net forums ( http://forums.java.net/jive/message.jspa?messageID=309391#309391 ) that with the 6u10 GA bits, relaunching of dragged-out applets from their desktop shortcuts is completely broken. Attempting to relaunch the simple draggable applet example from http://jdk6.dev.java.net/plugin2/ from its desktop shortcut results in the following exception:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at java.net.URL.getURLStreamHandler(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at com.sun.deploy.cache.Cache.getLocalApplicationProperties(Unknown Source)
	at sun.plugin2.applet.viewer.JNLP2Viewer.run(Unknown Source)
	at sun.plugin2.applet.viewer.JNLP2Viewer.main(Unknown Source)
Caused by: java.lang.NullPointerException
	at sun.plugin2.applet.Applet2BrowserService.isIExplorer(Unknown Source)
	at com.sun.deploy.security.BrowserKeystore.registerSecurityProviders(Unknown Source)
	at com.sun.deploy.net.protocol.https.Handler$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.deploy.net.protocol.https.Handler.<clinit>(Unknown Source)
	... 9 more

This failure is still reproducible with the 6u11 nightly builds.

Additionally, with a later build of the JRE, the following exception has been seen upon relaunch of a desktop shortcut and attempted shutdown of a dragged-out applet, because of a lack of an AccessController.doPrivileged() around the System.exit(0) call.

Exception in thread "AWT-EventQueue-4" java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0)
	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.checkExit(SecurityManager.java:744)
	at java.lang.Runtime.exit(Runtime.java:88)
	at java.lang.System.exit(System.java:906)
	at sun.plugin2.applet.viewer.JNLP2Viewer$1$1.appletExternalWindowClosed(JNLP2Viewer.java:298)
	at sun.plugin2.applet.DragHelper$PerAppletInfo$CloseListener.actionPerformed(DragHelper.java:672)
	at DragExample$1.mouseClicked(DragExample.java:75)
	at java.awt.Component.processMouseEvent(Component.java:6137)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
	at java.awt.Component.processEvent(Component.java:5899)
	at java.awt.Container.processEvent(Container.java:2023)
	at java.awt.Component.dispatchEventImpl(Component.java:4501)
	at java.awt.Container.dispatchEventImpl(Container.java:2081)
	at java.awt.Component.dispatchEvent(Component.java:4331)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3974)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
	at java.awt.Container.dispatchEventImpl(Container.java:2067)
	at java.awt.Component.dispatchEvent(Component.java:4331)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
The SecurityException upon closing an unsigned applet relaunched from a desktop shortcut which customizes the setAppletCloseListener behavior will also be inadvertently fixed by 6753665 in 6u12.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u11/6761053.0
20-10-2008

EVALUATION Problem: relaunching an applet which is hosted on a https server fails with a NPE. Closing the relaunched applet results in AccessControlException. Fix: in JNLP2Viewer for the NPE: pass in a default NoopExecutionContext to Applet2Environment.initialize() so that the Applet2BrowserService has an execution context; for AccessControlException: add a doPrivileged block for the System.exit(0) call.
20-10-2008