JDK-6662428 : BasicServiceImpl.showDocument() needs to be overridden in JNLP support for new plug-in
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2008-02-13
  • Updated: 2010-04-04
  • Resolved: 2008-03-09
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
6u10Resolved
Related Reports
Duplicate :  
Relates :  
Description
In the new support for launching applets from JNLP files in the new Java Plug-In, the Java Plug-In reuses the implementations of several JNLP services like the BasicServiceImpl. Unfortunately, the BasicServiceImpl's showDocument() support is over-specialized for Java Web Start. There are two problems with it: first, it re-initializes the DesktopBrowse class, which is not allowed, and second, showDocument() is implemented by launching a new process instead of sending a message back to the web browser via the new plug-in's existing showDocument() support.

The BasicServiceImpl code needs to be changed and/or refactored to allow overriding of its showDocument() implementation, which is not currently possible. Additionally, the JNLP2Manager needs to be changed to override it by sending a message back to the browser, likely with a _target of "blank" to create a new window to avoid destroying the applet during the showDocument() call (which is unlikely to be the desired behavior).

Comments
SUGGESTED FIX see CR 6668033 for details
09-03-2008

EVALUATION BasicServiceImpl used a fixed browser implementation for core JAVAWS only. In the OOPP JNLP applet case, we have to use our browser service.
02-03-2008

SUGGESTED FIX Enabled generic BasicService.showDocument() implementation. - BasicServiceImpl.java - Only call sun.awt.DesktopBrowse.setInstance(browser), if no previous browser was registered. - Use generic sun.awt.DesktopBrowse.getInstance(), for showDocument(), i.e. if it is the BasicServiceImpl one, use it, else use the generic sun.awt.DesktopBrowse.browse() implementation passing the absolute URL. Works for JVM >= 1.6 Manual tested on JRE's 1.6
02-03-2008