Question

With the new Java 7 update 45, we are not able to set properties. We used to set it as follows

<resources>
    ...
    <jar href="xxx.jar"/>
    <property name="xxx.xxx.xxx.xxx.userName" value="Batman"/>
    <property name="xxx.xxx.xxx.xxx.locale" value="en_US"/> 
    ...
</resources>

We tried the work around, tried the following

<resources>
    ...
    <jar href="xxx.jar"/>
    <property name="jnlp.xxx.xxx.xxx.xxx.userName" value="Batman"/>
    <property name="jnlp.xxx.xxx.xxx.xxx.locale" value="en_US"/> 
    ...
</resources>

even tried "javaws." added as prefix.

Problem is we that we want to avoid making change in the codebase and want to fix the issue in the jnlp level.

Do we have any other work around or any ideas?

Was it helpful?

Solution

According to this OpenJDK bug report (https://bugs.openjdk.java.net/browse/JDK-8023821) there are three possible workarounds:

  1. Sign the jnlp file. Use either a signed-jnlp file (JNLP-INF/APPLICATION.JNLP) or a signed jnlp template (JNLP-INF/APPLICATION_TEMPLATE.JNLP).

  2. Use secure properties. Change all the properties in the jnlp file to pre-pend "jnlp." to the property name, and modify all code to use the new properties name.

  3. Use secure properties and translate them in the main of your signed application to insecure properties. Change jnlp files to have the property names in the jnlp file pre-pended with "jnlp.myapp.", then in your application read the system properties and for each property starting with "jnlp.myapp." set the corresponding property without the "jnlp.myapp." pre-pended to the name.

It sounds like 2 and 3 are not what you want. So that leaves you with option 1. (Or accept that you need to change your codebase.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top