United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6504406 regression: Desktop.browse does not work properly for java plug-in applets
JDK-6504406 : regression: Desktop.browse does not work properly for java plug-in applets

Details
Type:
Bug
Submit Date:
2006-12-13
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2007-01-12
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u1
Fixed Versions:
6u1 (b02)

Related Reports
Backport:

Sub Tasks

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
EVALUATION

fix in 6u1 b02
                                     
2006-12-13
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/
                                     
2006-12-14



Hardware and Software, Engineered to Work Together