JDK-6742232 : Unable to create shortcut for the "Stopwatch" applet
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-08-27
  • Updated: 2010-09-08
  • Resolved: 2008-09-24
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.
6u10 b32Fixed
Steps to reproduce the problem:
1. Load the following draggable "Stopwatch" applet into a browser
2. Following the instructions in the webpage to drag the applet out of the browser.
3. Close the browser - at this point you'll be asked whether you want to create a shortcut for the dragged-out applet.
4. Upon clicking on "Yes" on the dialog from the above step, if you see an error dialog with "Unable to create a shortcut for Stopwatch" in the masthead, the problem is reproduced. (Screenshot of the dialog (stopwatch.PNG) is in the attachment.)

- this problem was there in 6u10 b30
- if you load a different draggable applet such as the following, the problem isn't reproducible:

EVALUATION The code path that is failing is in the WinInstallHandler when the cachedJNLP is null. The reason for this appears to be that the JNLP2Manager initially uses the document base to resolve the JNLP file (http://web-east.east.sun.com/...) and the file is placed in the deployment cache under that key by the DownloadEngine. When the JNLP file is later updated based on the codebase it contains, that cache entry is not updated, and/or a cache entry for the alternate URL (http://j2se.east.sun.com/...) is not created. When the desktop shortcut creation is attempted, the URL for which the cache entry is looked up is the updated one (http://j2se.east.sun.com/...), and since there is no cache entry, the shortcut creation fails. (It isn't clear to me why the shortcuts seem to get partially created.) The correct fix is probably to update the cache entry while updating the LaunchDesc. Need advice from the Java Web Start team.

EVALUATION The failure to create shortcuts occurs when the URL is referenced via http://web-east.east.sun.com/deployment/www/tests/1.6.0_10/6691243 but not via http://j2se.east.sun.com/deployment/www/tests/1.6.0_10/6691243 which is how the test case and its codebase are constructed. There is probably something wrong with the determination of the final location of the JNLP file, and the mismatch between this and the codebase of the JNLP file is what is causing the error in Java Web Start's shortcut creation code. The error message should be more descriptive, and in general this case should work, but this is not as high priority as originally thought. Downgrading to P3, but still targeting to 6u11.