JDK-6945141 : Need way to download pack200 content on demand from webstart application or browser applet
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u18
  • Priority: P5
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,windows_vista
  • CPU: generic,x86
  • Submitted: 2010-04-19
  • Updated: 2015-11-24
  • Resolved: 2015-11-24
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Windows Vista 32 bit
Microsoft Windows [Version 6.0.6002]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Netbeans 6.8 ,  java 1.6_18

A DESCRIPTION OF THE PROBLEM :
Java Web start docs state that "the URLs passed as arguments to all of the APIs were restricted to be URLs to resources listed in the jnlp file(s) of the running application.  This restriction is changed such that there are no restrictions for signed and trusted code, and the restriction on untrusted code is not that it be listed in the jnlp file(s), but only that it be from the same codebase."

Refer:
http://java.sun.com/javase/6/docs/technotes/guides/javaws/enhancements6.html

We have a signed app which downloads resources from the same codebase.
The resources are not listed in the jnlp file as they are determined dynamically based on customer needs.

This particular scenario works fine in 1.6.0_16 but does not work any more in 1.6.0_18 (we have not used any other scenario so it would be worth testing those too)


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try to load a resource using DownloadService.loadResource in java 1.6.0_18.  Ensure that the resource is not listed in the jnlp file and versioning is not enabled. (we suspect even if it is listed it will not work - please test this also).




EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
results should be as per spec

Refer:
http://java.sun.com/javase/6/docs/technotes/guides/javaws/enhancements6.html

JNLP Specification relaxation of requirements for the DownloadService API.

ACTUAL -
resources are not loaded we get a FailedDownloadException wrapping a FileNotFoundException


Release Regression From : 6u16
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
EVALUATION I tried the testcase, it has problems: The testcase tries to download a JAR that is not in the JNLP file, with name unlisted.jar. But in the bundle it provides, it has only "Unlisted.jar.pack.gz". The property jnlp.packEnabled should only applies to JARs listed in the JNLP file. So when it tries to download unlisted.jar, it's a 404. Uncompressing the JAR back to original form, and rename to unlisted.jar works. (testcase is trying to download lowercase unlisted.jar) In 6u17 or earlier, the property will apply to all JARs that gets downloaded, which is a bug. See 6874336. It's fixed in 6u18. However, we do need a documented way on how to download pack content on demand by the application. I am changing this CR to an RFE for this.
28-04-2010