Recent Posts
Archives

Posts Tagged ‘JNLP’

PostHeaderIcon System properties are ignored by Java WebStart with JRE 7

Abstract

On migrating an application deployed through Java WebStart from JRE 6 to JRE 7 (1.7.0_71 ; the problem is present since 1.7.0_4X), system properties are ignored.
As a reminder, system properties are declared in JNLP file as:

[xml]<property name="foo" value="boo"/>[/xml]

They are equivalent to execute JRE with -D arguments, such as -Dfoo=boo for the XML block above.

Launching the JNLP file with javaws file.jnlp -Dfoo=boo or even javaws file.jnlp -J-Dfoo=boo does not fix the issue.

Quick fix

Rename all system properties, so that they are prefixed with jnlp..
Eg, replace:
[xml]<property name="foo" value="boo"/>[/xml]
with:
[xml]<property name="jnlp.foo" value="boo"/>[/xml]
Do not forget to update any part of the code calling these properties!

For a sadistic reason I still ignore, properties that are not prefixed with jnlp. are no more considered by Java WebStart included in JRE 7.