JDK-6740228 : DnD: JNLP applets specifying system properties or JVM arguments don't relaunch
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-08-22
  • Updated: 2010-09-08
  • Resolved: 2008-10-01
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
6u10 b32Fixed
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
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.
05-09-2008

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

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.
03-09-2008