JDK-6504406 : regression: Desktop.browse does not work properly for java plug-in applets
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u1
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-12-13
  • Updated: 2010-09-08
  • Resolved: 2007-01-12
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 JDK 7
6u1 b02Fixed 7Fixed
Description
this is a regression created by a fix in 6u1 b01:

*6464971*: Need to implement webstart/plugin part of the bug fix 6439864

The code resets that handler for every app, instead of setting it up statically when plugin is initialized.

2 problems:

1.  the following exception is shown when you load another applet with the current plugin instance

java.lang.IllegalStateException: DesktopBrowse instance has already been set.
    at sun.awt.DesktopBrowse.setInstance(Unknown Source)
    at sun.plugin.AppletViewer.setAppletContext(Unknown Source)
    at sun.plugin.viewer.IExplorerPluginObject.<init>(Unknown Source)
    at sun.plugin.viewer.IExplorerPluginContext.createPluginObject(Unknown Source) 

2.  Desktop.browse only works for the first applet loaded; subsequent applet calling Desktop.browse won't work, and will result in a NullPointerException.

Comments
SUGGESTED FIX 1. Initialize DesktopBrowse instance using AppletViewer.initEnvironment, which will only be called once per plug-in instance. 2. Another bug in UpdateCheck.showDialog is discovered when fixing this bug, which causes AppletViewer.initEnvironment to bail out unexpectedly. regutils.dll is not loaded before the JNI call which requires the dll. Load the dll before the JNI calls. webrev: http://web-east.east/deployment/www/webrevs/ngthomas/6504406/webrev/
14-12-2006

EVALUATION fix in 6u1 b02
13-12-2006