United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6740228 : DnD: JNLP applets specifying system properties or JVM arguments don't relaunch

Details
Type:
Bug
Submit Date:
2008-08-22
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-10-01
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b32)

Related Reports

Sub Tasks

Description
A customer (see Comments for details) reports that if a JNLP-launched applet is dragged to the desktop and the JNLP file specifies system properties or (certain?) JVM command-line arguments, relaunching the applet from a desktop shortcut will fail with the following exception:

Starting applet (200x200) with parameters:
  height = 200
  __applet_relaunched = false
  java_arguments =
  width = 200
  code = applet.DragExample
Validating file:/C:/nbWorkspace/AppletTest/dist/AppletTest.jar , version null...
JNLP2Viewer.appletJRERelaunch:
    java_version   : 1.6+
    java_arguments : -Djnlp.packEnabled=true
java.lang.Exception: JNLP2Viewer.appletJRERelaunch: 1.6+ ; -Djnlp.packEnabled=true
    at sun.plugin2.applet.viewer.JNLP2Viewer$1$3.appletJRERelaunch(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.fireAppletJRERelaunch(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

The JNLP2Manager is attempting to relaunch the applet when doing so is not supported by the surrounding environment.

The customer's test case (NetBeans project) is attached.

                                    

Comments
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/deployment_data/6u11/6740228.3
                                     
2008-09-05
EVALUATION

The fix also adds a new method (isAppletRelaunchSupported) to Applet2Listener. It's because in JNLP2Manager, we'll need to determine if the listener supports applet relaunching before throwing JRESelectException. It's too late to make that determination in Plugin2Manager.
                                     
2008-09-05
EVALUATION

The problem is due to the launcher for launching dragged-out JNLP applet doesn't take into account the system properties or JVM arguments set inside a JNLP file. Therefore, the jvm used for launching the dragged-out applet doesn't contain the requested properties and will try to do a relaunch and fails in JNLP2Viewer.

A fix is to make use of the existing code in launcher.c for parsing the properties in the JNLP file and saves them as JnlpxArgs. The launcher will also launch a jvm (javaw.exe in this case) with the requested properties. So in JNLP2Viewer, it retreives the saved JnlpxArgs and stores them in JVMParameters. When JRE matching is performed, the launched jvm will satisfy the requested properties in the JNLP file and avoids a relaunch.
                                     
2008-09-03



Hardware and Software, Engineered to Work Together