-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
8u92
-
x86_64
-
windows_7
A DESCRIPTION OF THE REQUEST :
When a jnlp file uses jnlp.packEnabled to load the main JAR, and the applications libraries are declared in the main JAR manifest Class-Path attribute but not listed in the jnlp resources, the pack.gz version of the main JAR is downloaded but Web Start does not try to download the pack.gz versions of the library JAR files. The unpacked versions of the library JAR files are downloaded.
The jnlp.packEnabled property should apply to JAR files downloaded by Web Start even if the libraries are specified in the main JAR manifest and not in the jnlp resources.
.
JUSTIFICATION :
Sometimes it is desirable to have a small jnlp file. Removing library resources from the jnlp helps make it smaller but then initial install takes longer because it is loading the unpacked version of the libraries.
A new feature in Java 8u92 and Java 9 is the ability to create dynamic jnlp data for an application in the client browser and send it directly to Web Start as 'jnlp:data:application/x-java-jnlp-file;base64,' + encodedJNLP. A limitation to this approach is the size of the encoded data the browser can pass to Web Start, approximately 650 bytes of jnlp data on Windows. Removing the library list from the jnlp and putting it into the manifest helps reduce the size of the jnlp data.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When an application is downloaded with jnlp.packEnabled the pack.gz version of all JAR files should be downloaded.
ACTUAL -
The pack.gz version is only downloaded for the main JAR file. Unpacked versions are downloaded for the library JAR files.
---------- BEGIN SOURCE ----------
// Create a signed Main.jar app with library files declared in the manifest.
// Use Java 8u92 or later on a Windows system.
// Use javascript like this to create dynamic jnlp data, or create a static jnlp file.
var baseURL = location.href.substring(0, location.href.lastIndexOf("/"));
var szFile = '<jnlp spec="1.0+" codebase="' + baseURL + '" href="">' +
'<information>' +
'<title>Main Java Test</title>' +
'<vendor>Some Company</vendor>' +
'</information>' +
'<security><all-permissions/></security>' +
'<resources>' +
'<property name="jnlp.packEnabled" value="true"/>' +
'<jar href="Main.jar"/>' +
'</resources>' +
'<application-desc>' +
'<argument>native</argumemt>' +
'</application-desc>' +
'</jnlp>';
var encoded = Base64.encode(szFile);
window.open('jnlp:data:application/x-java-jnlp-file;base64,' + encoded);
---------- END SOURCE ----------
When a jnlp file uses jnlp.packEnabled to load the main JAR, and the applications libraries are declared in the main JAR manifest Class-Path attribute but not listed in the jnlp resources, the pack.gz version of the main JAR is downloaded but Web Start does not try to download the pack.gz versions of the library JAR files. The unpacked versions of the library JAR files are downloaded.
The jnlp.packEnabled property should apply to JAR files downloaded by Web Start even if the libraries are specified in the main JAR manifest and not in the jnlp resources.
.
JUSTIFICATION :
Sometimes it is desirable to have a small jnlp file. Removing library resources from the jnlp helps make it smaller but then initial install takes longer because it is loading the unpacked version of the libraries.
A new feature in Java 8u92 and Java 9 is the ability to create dynamic jnlp data for an application in the client browser and send it directly to Web Start as 'jnlp:data:application/x-java-jnlp-file;base64,' + encodedJNLP. A limitation to this approach is the size of the encoded data the browser can pass to Web Start, approximately 650 bytes of jnlp data on Windows. Removing the library list from the jnlp and putting it into the manifest helps reduce the size of the jnlp data.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
When an application is downloaded with jnlp.packEnabled the pack.gz version of all JAR files should be downloaded.
ACTUAL -
The pack.gz version is only downloaded for the main JAR file. Unpacked versions are downloaded for the library JAR files.
---------- BEGIN SOURCE ----------
// Create a signed Main.jar app with library files declared in the manifest.
// Use Java 8u92 or later on a Windows system.
// Use javascript like this to create dynamic jnlp data, or create a static jnlp file.
var baseURL = location.href.substring(0, location.href.lastIndexOf("/"));
var szFile = '<jnlp spec="1.0+" codebase="' + baseURL + '" href="">' +
'<information>' +
'<title>Main Java Test</title>' +
'<vendor>Some Company</vendor>' +
'</information>' +
'<security><all-permissions/></security>' +
'<resources>' +
'<property name="jnlp.packEnabled" value="true"/>' +
'<jar href="Main.jar"/>' +
'</resources>' +
'<application-desc>' +
'<argument>native</argumemt>' +
'</application-desc>' +
'</jnlp>';
var encoded = Base64.encode(szFile);
window.open('jnlp:data:application/x-java-jnlp-file;base64,' + encoded);
---------- END SOURCE ----------